ALSA: ac97: Copy string more safely
authorTakashi Iwai <tiwai@suse.de>
Thu, 10 Jul 2025 10:07:22 +0000 (12:07 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 11 Jul 2025 07:53:35 +0000 (09:53 +0200)
commit926359588170882ab39c578774a989a5237a3747
treeb8afd4455356dfe32b4913d3c7dbb64c5b649b5c
parenta9b25e8a437586fb1e1749caae96e305dc9e4906
ALSA: ac97: Copy string more safely

snd_ac97_get_name() blindly assumes that the name buffer is large
enough, but we should be more careful.  Pass the max buffer length and
allow trimming to the size.

Only a cosmetic safety matter, no functional changes intended.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250710100727.22653-101-tiwai@suse.de
sound/pci/ac97/ac97_codec.c
sound/pci/ac97/ac97_local.h
sound/pci/ac97/ac97_proc.c