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]
Date:   Mon, 18 Sep 2023 15:41:22 +0200
From:   Hans de Goede <hdegoede@...hat.com>
To:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        Fernando Eckhardt Valle <fevalle@....br>
Cc:     Mark Pearson <mpearson-lenovo@...ebb.ca>, corbet@....net,
        hmh@....eng.br, markgross@...nel.org, linux-doc@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>,
        ibm-acpi-devel@...ts.sourceforge.net,
        platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH v2] platform/x86: thinkpad_acpi: sysfs interface to auxmac

Hi,

On 9/15/23 18:18, Ilpo Järvinen wrote:
> On Fri, 15 Sep 2023, Fernando Eckhardt Valle wrote:

<snip>

>> +		goto auxmacinvalid;
>> +	}
>> +
>> +	if (strncmp(obj->string.pointer + 0x8, "#", 1) != 0 ||
>> +	    strncmp(obj->string.pointer + 0x15, "#", 1) != 0) {
> 
> Why use strncmp with (..., 1)? These offsets should defines above and not 
> use literals.

Right, good point.

To be extra clear here, this should be replaced by != '#' statements, e.g.:

	if (obj->string.pointer[AUXMAC_BEGIN_MARKER] != '#' ||
	    obj->string.pointer[AUXMAC_END_MARKER] != '#') {
		...

Regards,

Hans

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ