diff options
author | Pavel Skripkin <[email protected]> | 2022-04-15 23:24:48 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <[email protected]> | 2022-05-13 11:02:19 +0200 |
commit | 471bec68457aaf981add77b4f590d65dd7da1059 (patch) | |
tree | 2e326bdedcabe6d571e128a6c4b516352e9c961c /tools/perf/scripts/python/failed-syscalls-by-pid.py | |
parent | 6b124062d5b0f594ea46a20968061b60b288b524 (diff) |
media: pvrusb2: fix array-index-out-of-bounds in pvr2_i2c_core_init
Syzbot reported that -1 is used as array index. The problem was in
missing validation check.
hdw->unit_number is initialized with -1 and then if init table walk fails
this value remains unchanged. Since code blindly uses this member for
array indexing adding sanity check is the easiest fix for that.
hdw->workpoll initialization moved upper to prevent warning in
__flush_work.
Reported-and-tested-by: [email protected]
Fixes: d855497edbfb ("V4L/DVB (4228a): pvrusb2 to kernel 2.6.18")
Signed-off-by: Pavel Skripkin <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions