WSL2-Linux-Kernel/drivers/staging
Dan Carpenter de846dec7a 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-23 13:47:24 +02:00
..
android
axis-fifo
board
clocking-wizard clk: clocking-wizard: Fix Oops in clk_wzrd_register_divider() 2023-07-23 13:47:07 +02:00
emxx_udc staging: emxx_udc: Add checks for dma_alloc_coherent() 2023-03-11 13:57:34 +01:00
fbtft
fieldbus
fwserial
gdm724x
greybus
gs_fpgaboot
iio staging: iio: resolver: ads1210: fix config mode 2023-05-11 23:00:16 +09:00
ks7010
media media: atomisp: gmin_platform: fix out_len in gmin_get_config_dsm_var() 2023-07-23 13:47:24 +02:00
most
mt7621-dma
mt7621-dts staging: mt7621-dts: change palmbus address to lower case 2023-03-03 11:45:53 +01:00
mt7621-pci
netlogic
nvec
octeon
octeon-usb
olpc_dcon
pi433
qlge
r8188eu
ralink-gdma
rtl8192e Revert "staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE" 2023-06-14 11:13:10 +02:00
rtl8192u staging: rtl8192u: Fix use after free in ieee80211_rx() 2022-12-31 13:14:30 +01:00
rtl8712
rtl8723bs drivers: staging: rtl8723bs: Fix locking in rtw_scan_timeout_handler() 2023-05-11 23:00:31 +09:00
rts5208
sm750fb
unisys
vc04_services staging: vchiq_arm: fix enum vchiq_status return types 2023-01-24 07:22:45 +01:00
vme
vt6655
vt6656
wfx
wlan-ng
Kconfig
Makefile