[media] rc: fix buffer overrun
authorSean Young <sean@mess.org>
Thu, 23 Aug 2012 20:18:25 +0000 (17:18 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 15 Sep 2012 14:51:28 +0000 (11:51 -0300)
"[media] rc-core: move timeout and checks to lirc" introduced a buffer
overrun by passing the number of bytes, rather than the number of samples,
to the transmit function.

Signed-off-by: Sean Young <sean@mess.org>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/ir-lirc-codec.c

index 6ad4a07706133c0385ed5690e2ac68aeb565ece2..569124b03de3f8ecfa67321a536e144b628b81cd 100644 (file)
@@ -140,7 +140,7 @@ static ssize_t ir_lirc_transmit_ir(struct file *file, const char __user *buf,
                goto out;
        }
 
-       ret = dev->tx_ir(dev, txbuf, (u32)n);
+       ret = dev->tx_ir(dev, txbuf, count);
        if (ret < 0)
                goto out;