diff options
| author | Tom Rix <[email protected]> | 2021-08-12 19:00:43 +0200 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2021-09-30 10:07:54 +0200 |
| commit | 48d219f9cc667bc6fbc3e3af0b1bfd75db94fce4 (patch) | |
| tree | 212d348c22a46b6cfc13d164ddaa81f1e4452052 /tools/perf/scripts/python | |
| parent | cdfaf4752e6915a4b455ad4400133e540e4dc965 (diff) | |
media: TDA1997x: handle short reads of hdmi info frame.
Static analysis reports this representative problem
tda1997x.c:1939: warning: 7th function call argument is an uninitialized
value
The 7th argument is buffer[0], which is set in the earlier call to
io_readn(). When io_readn() call to io_read() fails with the first
read, buffer[0] is not set and 0 is returned and stored in len.
The later call to hdmi_infoframe_unpack()'s size parameter is the
static size of buffer, always 40, so a short read is not caught
in hdmi_infoframe_unpacks()'s checking. The variable len should be
used instead.
Zero initialize buffer to 0 so it is in a known start state.
Fixes: 9ac0038db9a7 ("media: i2c: Add TDA1997x HDMI receiver driver")
Signed-off-by: Tom Rix <[email protected]>
Reviewed-by: Tim Harvey <[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