media: dvb-usb/dvb-usb-urb.c: initialize actlen to 0
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 12 Nov 2019 09:22:28 +0000 (10:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Feb 2020 13:05:47 +0000 (13:05 +0000)
commit 569bc8d6a6a50acb5fcf07fb10b8d2d461fdbf93 upstream.

This fixes a syzbot failure since actlen could be uninitialized,
but it was still used.

Syzbot link:

https://syzkaller.appspot.com/bug?extid=6bf9606ee955b646c0e1

Reported-and-tested-by: syzbot+6bf9606ee955b646c0e1@syzkaller.appspotmail.com
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/dvb-usb/dvb-usb-urb.c

index 95f9097..2fa8d71 100644 (file)
@@ -11,7 +11,7 @@
 int dvb_usb_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf,
        u16 rlen, int delay_ms)
 {
-       int actlen,ret = -ENOMEM;
+       int actlen = 0, ret = -ENOMEM;
 
        if (!d || wbuf == NULL || wlen == 0)
                return -EINVAL;