Re: [PATCH] ALSA: aoa: size the codec reference property name buffer
From: Aibing Chen
Date: Sun Nov 22 2026 - 22:28:18 EST
Hi Takashi,
You are right, there is no truncation with the codecs that exist in the
tree. codec->name is only ever set from a fixed string:
sound/aoa/codecs/onyx.c:1005 strscpy(onyx->codec.name, "onyx");
sound/aoa/codecs/tas.c:860 strscpy(tas->codec.name, "tas");
sound/aoa/codecs/toonie.c:129 strscpy(toonie->codec.name, "toonie");
so the longest property name built by check_codec() is
"platform-toonie-codec-ref", 25 bytes including the terminator, which
fits in the existing 32 byte array. The W=1 warning is a false positive:
the compiler cannot bound the length of codec->name.
I will drop the patch.
Thanks,
Aibing Chen