Re: [PATCH] ALSA: hdsp: enlarge the MIDI name buffer
From: Aibing Chen
Date: Sun Nov 22 2026 - 22:28:13 EST
Hi Takashi,
Verified that there is no overflow with this driver. card->shortname is
only ever assigned a fixed string:
sound/pci/rme9652/hdsp.c:5053 strscpy(card->shortname, "Hammerfall DSP");
sound/pci/rme9652/hdsp.c:5354 strscpy(card->shortname, "Hammerfall DSP");
so it is always 14 characters. " MIDI " plus id + 1 (a single digit for
every card this driver supports) brings the formatted name to at most 21
characters plus the terminator, well below the 40 byte buffer. The W=1
warning is a false positive because the compiler cannot bound
card->shortname.
I will drop the patch.
Thanks,
Aibing Chen