Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/7] ALSA: remove remaining strlcat() users under sound/
@ 2026-08-07 11:41 Mahad Ibrahim
  2026-08-07 11:41 ` [PATCH 1/7] ALSA: ump: replace strlcat() with strscpy() Mahad Ibrahim
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Mahad Ibrahim @ 2026-08-07 11:41 UTC (permalink / raw)
  To: Takashi Iwai, Jaroslav Kysela
  Cc: Kees Cook, Andy Shevchenko, linux-sound, linux-kernel,
	Mahad Ibrahim

strlcat() is deprecated and slated for removal once its remaining
users are converted.  This series converts the sound/ users outside
of ASoC.

Each site is converted to an explicit offset plus a bounded copy:
strscpy() where the appended text has no format specifiers, and
scnprintf() where it does or where the resulting length is needed.

After this series the only remaining strlcat() user under sound/ is
sound/soc/codecs/wm_adsp_fw_find_test.c, which goes via ASoC.

Build-tested with allmodconfig and boot-tested on x86_64.

The generated strings were checked against the pre-patch code in a
userspace harness for empty, whitespace-padded, exact-fit and
oversized inputs, and came out identical.  No audio hardware was
available here, so the drivers themselves have not been exercised at
runtime.

Mahad Ibrahim (7):
  ALSA: ump: replace strlcat() with strscpy()
  ALSA: ac97: replace strlcat() with scnprintf()
  ALSA: cmipci: replace strlcat() with strscpy()
  ALSA: caiaq: replace strlcat() with strscpy()
  ALSA: usb-audio: replace strlcat() with append_ctl_name()
  ALSA: hiface: replace strlcat() with scnprintf()
  ALSA: usb-audio: replace strlcat() in longname construction

 sound/core/ump.c            |  7 +++++--
 sound/pci/ac97/ac97_codec.c |  8 ++++----
 sound/pci/cmipci.c          |  8 ++++++--
 sound/usb/caiaq/input.c     |  5 +++--
 sound/usb/card.c            | 27 +++++++++++++++++----------
 sound/usb/hiface/chip.c     |  4 ++--
 sound/usb/mixer.c           |  8 ++++++--
 7 files changed, 43 insertions(+), 24 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-08-08 13:04 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07 11:41 [PATCH 0/7] ALSA: remove remaining strlcat() users under sound/ Mahad Ibrahim
2026-08-07 11:41 ` [PATCH 1/7] ALSA: ump: replace strlcat() with strscpy() Mahad Ibrahim
2026-08-07 11:41 ` [PATCH 2/7] ALSA: ac97: replace strlcat() with scnprintf() Mahad Ibrahim
2026-08-07 11:41 ` [PATCH 3/7] ALSA: cmipci: replace strlcat() with strscpy() Mahad Ibrahim
2026-08-07 11:41 ` [PATCH 4/7] ALSA: caiaq: " Mahad Ibrahim
2026-08-07 11:41 ` [PATCH 5/7] ALSA: usb-audio: replace strlcat() with append_ctl_name() Mahad Ibrahim
2026-08-07 11:41 ` [PATCH 6/7] ALSA: hiface: replace strlcat() with scnprintf() Mahad Ibrahim
2026-08-07 11:41 ` [PATCH 7/7] ALSA: usb-audio: replace strlcat() in longname construction Mahad Ibrahim
2026-08-07 12:15 ` [PATCH 0/7] ALSA: remove remaining strlcat() users under sound/ Takashi Iwai
2026-08-07 13:04   ` David Laight
2026-08-07 15:41   ` Mahad Ibrahim
2026-08-07 16:03     ` Takashi Iwai
2026-08-07 21:46       ` Kees Cook
2026-08-08 13:04         ` David Laight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox