diff options
| author | Colin Ian King <[email protected]> | 2018-01-31 12:33:09 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2018-02-26 08:00:06 -0500 |
| commit | 67300abdbe9f1717532aaf4e037222762716d0f6 (patch) | |
| tree | b934726b761aabb28aaf84c7eff2efe8a7fa0595 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | 7b73ce9d4cd851b81e43025b44813de9920d0b7d (diff) | |
media: cx25821: prevent out-of-bounds read on array card
Currently an out of range dev->nr is detected by just reporting the
issue and later on an out-of-bounds read on array card occurs because
of this. Fix this by checking the upper range of dev->nr with the size
of array card (removes the hard coded size), move this check earlier
and also exit with the error -ENOSYS to avoid the later out-of-bounds
array read.
Detected by CoverityScan, CID#711191 ("Out-of-bounds-read")
Fixes: commit 02b20b0b4cde ("V4L/DVB (12730): Add conexant cx25821 driver")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
[[email protected]: %ld -> %zd]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions