Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: dvb-usb/dvb-usb-urb.c: initialize actlen to 0

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>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
569bc8d6 de89d086

+1 -1
+1 -1
drivers/media/usb/dvb-usb/dvb-usb-urb.c
··· 12 12 int dvb_usb_generic_rw(struct dvb_usb_device *d, u8 *wbuf, u16 wlen, u8 *rbuf, 13 13 u16 rlen, int delay_ms) 14 14 { 15 - int actlen,ret = -ENOMEM; 15 + int actlen = 0, ret = -ENOMEM; 16 16 17 17 if (!d || wbuf == NULL || wlen == 0) 18 18 return -EINVAL;