提交 0a67fe45 编写于 作者: M Malcolm Priestley 提交者: Mauro Carvalho Chehab

[media] lmedm04: fix data usage past the end of the buffer

On Mon, 2012-08-13 at 19:58 +0300, Dan Carpenter wrote:
> Hello Mauro Carvalho Chehab,
>
> The patch db6651a9: "[media] lmedm04: fix build" from Aug 12,
> 2012, leads to the following warning:
> drivers/media/dvb/dvb-usb-v2/lmedm04.c:769 lme2510_download_firmware()
> 	 error: usb_control_msg() 'data' too small (128 vs 265)
>
>    737          data = kzalloc(128, GFP_KERNEL);
>                                ^^^
> data is 128 bytes.

Control isn't used, so remove it.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 ae530205
......@@ -766,10 +766,6 @@ static int lme2510_download_firmware(struct dvb_usb_device *d,
}
}
usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0),
0x06, 0x80, 0x0200, 0x00, data, 0x0109, 1000);
data[0] = 0x8a;
len_in = 1;
msleep(2000);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册