Re: [PATCH v4] ALSA: hda/tas2781: Add speaker id check for ASUS projects
From: Takashi Iwai
Date: Wed Nov 13 2024 - 08:05:28 EST
On Mon, 04 Nov 2024 10:31:38 +0100,
Baojun Xu wrote:
> + // Speaker id was needed for ASUS projects.
> + if (!strncmp(sub, TAS2781_ASUS_ID, sizeof(TAS2781_ASUS_ID))) {
Is this really correct? The sizeof(TAS2781_ASUS_ID) is 5, including
the terminating NUL. So this becomes equivalent with strcmp(), and
it doesn't check the sub-string.
thanks,
Takashi