Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 226315
b: refs/heads/master
c: 4c8b869
h: refs/heads/master
i:
  226313: a44068c
  226311: eeff209
v: v3
  • Loading branch information
Vasiliy Kulikov authored and Mauro Carvalho Chehab committed Dec 29, 2010
1 parent 7873ef6 commit 8338a60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87d1a50ce45168cbaec10397e876286a398052c1
refs/heads/master: 4c8b8698053c986f5f5249878eab70cb028a1023
5 changes: 3 additions & 2 deletions trunk/drivers/media/rc/ir-lirc-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char *buf,
struct lirc_codec *lirc;
struct rc_dev *dev;
int *txbuf; /* buffer with values to transmit */
int ret = 0, count;
int ret = 0;
size_t count;

lirc = lirc_get_pdata(file);
if (!lirc)
Expand All @@ -110,7 +111,7 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char *buf,
return -EINVAL;

count = n / sizeof(int);
if (count > LIRCBUF_SIZE || count % 2 == 0)
if (count > LIRCBUF_SIZE || count % 2 == 0 || n % sizeof(int) != 0)
return -EINVAL;

txbuf = memdup_user(buf, n);
Expand Down

0 comments on commit 8338a60

Please sign in to comment.