diff options
| author | Jia-Ju Bai <baijiaju1990@gmail.com> | 2019-07-29 13:14:44 +0300 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-11-27 10:02:13 +0300 |
| commit | 3ec7fdc58363bb204c75d6158e3560fd7cabbf5c (patch) | |
| tree | eab3f800b888abb9ac39938b67927530ff9d68eb /include | |
| parent | bf9d46f751e75bf3d9a48bd69675f95d86ff7eb9 (diff) | |
| download | linux-3ec7fdc58363bb204c75d6158e3560fd7cabbf5c.tar.xz | |
media: usb: msi2500: Fix a possible null-pointer dereference in msi2500_stop_streaming()
In msi2500_stop_streaming(), there is an if statement on line 870 to
check whether dev->udev is NULL:
if (dev->udev)
When dev->udev is NULL, it is used on line 877:
msi2500_ctrl_msg(dev, CMD_STOP_STREAMING, 0)
usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), ...)
Thus, a possible null-pointer dereference may occur.
To fix this bug, dev->udev is checked before calling msi2500_ctrl_msg().
This bug is found by a static analysis tool STCheck written by us.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
