[4/5] dvb-usb/digitv: initialize key[]
diff mbox series

Message ID 20191112092228.15800-5-hverkuil-cisco@xs4all.nl
State New
Headers show
Series
  • Fix various syzbot errors
Related show

Commit Message

Hans Verkuil Nov. 12, 2019, 9:22 a.m. UTC
The key array was not initialized to 0, leading to a syzbot failure.

Syzbot link:

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

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: syzbot+6bf9606ee955b646c0e1@syzkaller.appspotmail.com
CC: Sean Young <sean@mess.org>
---
 drivers/media/usb/dvb-usb/digitv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sean Young Nov. 12, 2019, 9:51 a.m. UTC | #1
On Tue, Nov 12, 2019 at 10:22:27AM +0100, Hans Verkuil wrote:
> The key array was not initialized to 0, leading to a syzbot failure.
> 
> Syzbot link:
> 
> https://syzkaller.appspot.com/bug?extid=6bf9606ee955b646c0e1
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Reported-by: syzbot+6bf9606ee955b646c0e1@syzkaller.appspotmail.com
> CC: Sean Young <sean@mess.org>

Same as:

https://patchwork.linuxtv.org/patch/59984/

Sean
> ---
>  drivers/media/usb/dvb-usb/digitv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/usb/dvb-usb/digitv.c b/drivers/media/usb/dvb-usb/digitv.c
> index dd5bb230cec1..72b22409880a 100644
> --- a/drivers/media/usb/dvb-usb/digitv.c
> +++ b/drivers/media/usb/dvb-usb/digitv.c
> @@ -231,7 +231,7 @@ static struct rc_map_table rc_map_digitv_table[] = {
>  static int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
>  {
>  	int i;
> -	u8 key[5];
> +	u8 key[5] = { 0 };
>  	u8 b[4] = { 0 };
>  
>  	*event = 0;
> -- 
> 2.24.0

Patch
diff mbox series

diff --git a/drivers/media/usb/dvb-usb/digitv.c b/drivers/media/usb/dvb-usb/digitv.c
index dd5bb230cec1..72b22409880a 100644
--- a/drivers/media/usb/dvb-usb/digitv.c
+++ b/drivers/media/usb/dvb-usb/digitv.c
@@ -231,7 +231,7 @@  static struct rc_map_table rc_map_digitv_table[] = {
 static int digitv_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
 {
 	int i;
-	u8 key[5];
+	u8 key[5] = { 0 };
 	u8 b[4] = { 0 };
 
 	*event = 0;