diff options
| author | Johan Hovold <[email protected]> | 2020-01-03 17:35:11 +0100 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2020-03-12 17:27:07 +0100 |
| commit | a246b4d547708f33ff4d4b9a7a5dbac741dc89d8 (patch) | |
| tree | 4f46a1826995b11253b16c34df86fd64d902bc9c /tools/perf/scripts/python | |
| parent | 485b06aadb933190f4bc44e006076bc27a23f205 (diff) | |
media: xirlink_cit: add missing descriptor sanity checks
Make sure to check that we have two alternate settings and at least one
endpoint before accessing the second altsetting structure and
dereferencing the endpoint arrays.
This specifically avoids dereferencing NULL-pointers or corrupting
memory when a device does not have the expected descriptors.
Note that the sanity check in cit_get_packet_size() is not redundant as
the driver is mixing looking up altsettings by index and by number,
which may not coincide.
Fixes: 659fefa0eb17 ("V4L/DVB: gspca_xirlink_cit: Add support for camera with a bcd version of 0.01")
Fixes: 59f8b0bf3c12 ("V4L/DVB: gspca_xirlink_cit: support bandwidth changing for devices with 1 alt setting")
Cc: stable <[email protected]> # 2.6.37
Cc: Hans de Goede <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions