瀏覽代碼

[media] 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 <sean@mess.org>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sean Young 13 年之前
父節點
當前提交
586c61fd88
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/media/rc/ir-lirc-codec.c

+ 1 - 1
drivers/media/rc/ir-lirc-codec.c

@@ -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;