kernel_samsung_a53x/drivers/media
Mauro Carvalho Chehab 15ecef70ed media: s5p-jpeg: prevent buffer overflows
commit 14a22762c3daeac59a5a534e124acbb4d7a79b3a upstream.

The current logic allows word to be less than 2. If this happens,
there will be buffer overflows, as reported by smatch. Add extra
checks to prevent it.

While here, remove an unused word = 0 assignment.

Fixes: 6c96dbbc2aa9 ("[media] s5p-jpeg: add support for 5433")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:23 +01:00
..
cec Revert "media: cec: core: avoid confusing "transmit timed out" message" 2024-11-19 14:03:20 +01:00
common Revert "media: videobuf2-core: clear memory related fields in __vb2_plane_dmabuf_put()" 2024-11-24 00:22:58 +01:00
dvb-core media: dvb_frontend: don't play tricks with underflow values 2024-11-30 02:33:23 +01:00
dvb-frontends media: stb0899_algo: initialize cfr before using it 2024-11-30 02:33:23 +01:00
firewire Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c media: adv7604: prevent underflow condition when reporting colorspace 2024-11-30 02:33:23 +01:00
mc media: mc: mark the media devnode as registered from the, start 2024-11-19 12:27:17 +01:00
mmc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci Revert "media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c)" 2024-11-24 00:23:52 +01:00
platform media: s5p-jpeg: prevent buffer overflows 2024-11-30 02:33:23 +01:00
radio media: radio-isa: use dev_name to fill in bus_info 2024-11-23 23:20:44 +01:00
rc lirc: rc_dev_get_from_fd(): fix file leak 2024-11-23 23:20:18 +01:00
spi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test-drivers Revert "media: vivid: fix wrong sizeimage value for mplane" 2024-11-24 00:23:43 +01:00
tuners media: xc4000: Fix atomicity violation in xc4000_get_frequency 2024-11-19 09:22:15 +01:00
usb Revert "media: uvcvideo: Use entity get_cur in uvc_ctrl_set" 2024-11-24 00:23:54 +01:00
v4l2-core media: v4l2-core: hold videodev_lock until dev reg, finishes 2024-11-19 12:27:17 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00