lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZzT2EE3-PxLj3bDo@smile.fi.intel.com>
Date: Wed, 13 Nov 2024 20:55:12 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Takashi Iwai <tiwai@...e.de>
Cc: Baojun Xu <baojun.xu@...com>, robh+dt@...nel.org, lgirdwood@...il.com,
	perex@...ex.cz, pierre-louis.bossart@...ux.intel.com,
	shenghao-ding@...com, navada@...com, 13916275206@....com,
	v-hampiholi@...com, v-po@...com, linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org, liam.r.girdwood@...el.com,
	yung-chuan.liao@...ux.intel.com, broonie@...nel.org,
	antheas.dk@...il.com, philm@...jaro.org
Subject: Re: [PATCH v4] ALSA: hda/tas2781: Add speaker id check for ASUS
 projects

On Wed, Nov 13, 2024 at 02:01:51PM +0100, Takashi Iwai wrote:
> 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.

It all depends to what that method returns. If it returns the exact string
then strcmp() is fine, if not, we should understand what it returns then.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ