summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2021-08-12 19:00:43 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-09-30 10:07:54 +0200
commit48d219f9cc667bc6fbc3e3af0b1bfd75db94fce4 (patch)
tree212d348c22a46b6cfc13d164ddaa81f1e4452052 /drivers/media/usb
parentcdfaf4752e6915a4b455ad4400133e540e4dc965 (diff)
downloadlinux-48d219f9cc667bc6fbc3e3af0b1bfd75db94fce4.tar.bz2
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 <trix@redhat.com> Reviewed-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/usb')
0 files changed, 0 insertions, 0 deletions