media: usb: fix uninit-value in sq905_read_data
Subsystems (2)
PATCH 1/1 media: usb: fix uninit-value in sq905_read_data
sybot reported uninit value in sq905_read_data(). The problem was in the error conditions in usb_bulk_msg() before act_len initialization.
Reported-by [email protected]
Signed-off-by Pavel Skripkin <[email protected]>
--- drivers/media/usb/gspca/sq905.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/usb/gspca/sq905.c +1 -1
@@ -158,7 +158,7 @@ static int sq905_read_data(struct gspca_dev *gspca_dev, u8 *data, int size, int need_lock) { int ret; -int act_len; +int act_len =0 ; gspca_dev->usb_buf[0 ] ='\0' ;if (need_lock)
Signature · 1 line
2.25.1