linux/sound/drivers
Thorsten Blum ad5f82ab04 ALSA: pcmtest: Replace deprecated strcpy with strscpy_pad in setup_patt_bufs
strcpy() has been deprecated [1] because it performs no bounds checking
on the destination buffer, which can lead to buffer overflows. Replace
it with the safer strscpy_pad(), and use kmalloc() instead of kzalloc()
because strscpy_pad() zero-pads the destination buffer and therefore
avoids writing to it twice.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1]
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20251119135217.233084-1-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-19 17:16:49 +01:00
..
mpu401 ALSA: mpu401: Use guard() for spin locks 2025-09-01 13:53:34 +02:00
opl3 ALSA: opl3: Use guard() for spin locks 2025-09-01 13:53:34 +02:00
opl4 ALSA: opl4: Use guard() for spin locks 2025-09-01 13:53:34 +02:00
pcsp ALSA: pcsp: Use safer strscpy() instead of strcpy() 2025-07-11 09:51:09 +02:00
vx ALSA: vx: Use guard() for mutex locks 2025-09-01 13:53:34 +02:00
Kconfig ALSA: Make SND_PCMTEST depend on DEBUG_FS 2023-08-18 09:10:22 +02:00
Makefile ALSA: drivers: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:57 +02:00
aloop.c ALSA: aloop: Use guard() for spin locks 2025-09-01 13:53:34 +02:00
dummy.c ALSA: dummy: Use guard() for spin locks 2025-09-01 13:53:34 +02:00
mtpav.c ALSA: mtpav: Use guard() for spin locks 2025-09-01 13:53:35 +02:00
mts64.c ALSA: mts64: Use guard() for spin locks 2025-09-01 13:53:35 +02:00
pcmtest.c ALSA: pcmtest: Replace deprecated strcpy with strscpy_pad in setup_patt_bufs 2025-11-19 17:16:49 +01:00
portman2x4.c ALSA: portman2x4: Use guard() for spin locks 2025-09-01 13:53:35 +02:00
serial-generic.c ALSA: serial-generic: remove shared static buffer 2025-09-15 12:33:53 +02:00
serial-u16550.c ALSA: serial-u16550: Use guard() for spin locks 2025-09-01 13:53:35 +02:00
virmidi.c ALSA: virmidi: Use safer strscpy() instead of strcpy() 2025-07-11 09:51:09 +02:00