linux/drivers/parport
Takashi Iwai 66029078fe parport: Proper fix for array out-of-bounds access
commit 02ac3a9ef3 upstream.

The recent fix for array out-of-bounds accesses replaced sprintf()
calls blindly with snprintf().  However, since snprintf() returns the
would-be-printed size, not the actually output size, the length
calculation can still go over the given limit.

Use scnprintf() instead of snprintf(), which returns the actually
output letters, for addressing the potential out-of-bounds access
properly.

Fixes: ab11dac93d ("dev/parport: fix the array out-of-bounds risk")
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240920103318.19271-1-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-22 15:46:33 +02:00
..
BUGS-parport
daisy.c
ieee1284_ops.c
ieee1284.c
Kconfig
Makefile
multiface.h
parport_amiga.c
parport_atari.c
parport_cs.c
parport_gsc.c parport: gsc: remove DMA leftover code 2023-08-03 14:40:37 +02:00
parport_gsc.h parport: gsc: remove DMA leftover code 2023-08-03 14:40:37 +02:00
parport_ip32.c
parport_mfc3.c
parport_pc.c parport: Add support for Brainboxes IX/UC/PX parallel cards 2023-12-13 18:45:32 +01:00
parport_serial.c parport: parport_serial: Add Brainboxes device IDs and geometry 2024-01-20 11:51:48 +01:00
parport_sunbpp.c parport: Explicitly include correct DT includes 2023-08-28 13:36:24 -05:00
probe.c
procfs.c parport: Proper fix for array out-of-bounds access 2024-10-22 15:46:33 +02:00
share.c
TODO-parport