rc: fix buffer overrun
Subsystems (2)
Sean Young
maintainerPATCH 1/1 rc: fix buffer overrun
"[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 <[email protected]>
--- drivers/media/rc/ir-lirc-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/ir-lirc-codec.c +1 -1
@@ -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;
Signature · 1 line
1.7.11.4
Quoted 5 lines · Sean Young
"[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 <[email protected]>
Acked-by David Härdeman <[email protected]>
Thanks for noticing
Quoted 20 lines
---
drivers/media/rc/ir-lirc-codec.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/rc/ir-lirc-codec.c +1
-1@@ -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;Signature · 1 line
1.7.11.4
Signature · 1 line
David Härdeman