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: <aXDdARDpyzF_jC4l@black.igk.intel.com>
Date: Wed, 21 Jan 2026 15:04:49 +0100
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Koichiro Den <koichiro.den@...onical.com>,
	Geert Uytterhoeven <geert+renesas@...der.be>,
	Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>, linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] gpio: aggregator: fix "_sysfs" prefix check in
 gpio_aggregator_make_group()

On Sat, Apr 12, 2025 at 01:15:00PM +0300, Dan Carpenter wrote:
> This code is intended to reject strings that start with "_sysfs" but the
> strcmp() limit is wrong so checks the whole string instead of the prefix.

...

>  	if (strncmp(name, AGGREGATOR_LEGACY_PREFIX,
> -		    sizeof(AGGREGATOR_LEGACY_PREFIX)) == 0)
> +		    sizeof(AGGREGATOR_LEGACY_PREFIX) - 1) == 0)
>  		return ERR_PTR(-EINVAL);

Wouldn't be better to use strstarts() / str_has_prefix()?

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ