diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-08-15 15:00:33 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-08-19 17:08:45 +0200 |
commit | 8b8900b729e4f31f12ac1127bde137c775c327e6 (patch) | |
tree | 634a079f9d8bb0d9ecc6aff8ec55ea7e6aa02b77 /drivers/media/usb | |
parent | media: radio/si470x: kill urb on error (diff) | |
download | linux-8b8900b729e4f31f12ac1127bde137c775c327e6.tar.xz linux-8b8900b729e4f31f12ac1127bde137c775c327e6.zip |
media: hdpvr: add terminating 0 at end of string
dev->usbc_buf was passed as argument for %s, but it was not safeguarded
by a terminating 0.
This caused this syzbot issue:
https://syzkaller.appspot.com/bug?extid=79d18aac4bf1770dd050
Reported-and-tested-by: syzbot+79d18aac4bf1770dd050@syzkaller.appspotmail.com
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/hdpvr/hdpvr-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c b/drivers/media/usb/hdpvr/hdpvr-core.c index a0905c81d2cb..b75c18a012a7 100644 --- a/drivers/media/usb/hdpvr/hdpvr-core.c +++ b/drivers/media/usb/hdpvr/hdpvr-core.c @@ -137,6 +137,7 @@ static int device_authorization(struct hdpvr_device *dev) dev->fw_ver = dev->usbc_buf[1]; + dev->usbc_buf[46] = '\0'; v4l2_info(&dev->v4l2_dev, "firmware version 0x%x dated %s\n", dev->fw_ver, &dev->usbc_buf[2]); |