提交 821117dc 编写于 作者: A Alyssa Milburn 提交者: Mauro Carvalho Chehab

[media] digitv: limit messages to buffer size

Return an error rather than memcpy()ing beyond the end of the buffer.
Internal callers use appropriate sizes, but digitv_i2c_xfer may not.
Signed-off-by: NAlyssa Milburn <amilburn@zall.org>
Cc: stable@vger.kernel.org
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 e8357cde
......@@ -33,6 +33,9 @@ static int digitv_ctrl_msg(struct dvb_usb_device *d,
wo = (rbuf == NULL || rlen == 0); /* write-only */
if (wlen > 4 || rlen > 4)
return -EIO;
memset(st->sndbuf, 0, 7);
memset(st->rcvbuf, 0, 7);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册