mirror-linux/drivers/staging
Dan Carpenter d199218881 media: atomisp: gmin_platform: fix out_len in gmin_get_config_dsm_var()
[ Upstream commit 1657f2934d ]

Ideally, strlen(cur->string.pointer) and strlen(out) would be the same.
But this code is using strscpy() to avoid a potential buffer overflow.
So in the same way we should take the strlen() of the smaller string to
avoid a buffer overflow in the caller, gmin_get_var_int().

Link: https://lore.kernel.org/r/26124bcd-8132-4483-9d67-225c87d424e8@kili.mountain

Fixes: 387041cda4 ("media: atomisp: improve sensor detection code to use _DSM table")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-19 16:21:54 +02:00
..
axis-fifo staging: axis-fifo: initialize timeouts in init only 2023-05-24 17:32:40 +01:00
board
emxx_udc
fbtft
fieldbus
gdm724x
greybus
iio staging: iio: resolver: ads1210: fix config mode 2023-05-11 23:03:01 +09:00
ks7010
media media: atomisp: gmin_platform: fix out_len in gmin_get_config_dsm_var() 2023-07-19 16:21:54 +02:00
most
nvec
octeon
olpc_dcon
pi433
qlge
r8188eu
rtl8192e Revert "staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE" 2023-06-14 11:15:34 +02:00
rtl8192u
rtl8712
rtl8723bs drivers: staging: rtl8723bs: Fix locking in rtw_scan_timeout_handler() 2023-05-11 23:03:27 +09:00
rts5208
sm750fb
vc04_services staging: vchiq_arm: mark vchiq_platform_init() static 2023-07-19 16:21:52 +02:00
vme_user
vt6655
vt6656
wlan-ng
Kconfig
Makefile