1
linux/drivers/parport
Takashi Iwai 02ac3a9ef3 parport: Proper fix for array out-of-bounds access
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-13 18:17:35 +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.h
parport_ip32.c
parport_mfc3.c
parport_pc.c
parport_serial.c
parport_sunbpp.c
probe.c
procfs.c parport: Proper fix for array out-of-bounds access 2024-10-13 18:17:35 +02:00
share.c Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
TODO-parport