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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191002183603.GC13492@amd>
Date:   Wed, 2 Oct 2019 20:36:03 +0200
From:   Pavel Machek <pavel@....cz>
To:     Dan Murphy <dmurphy@...com>
Cc:     jacek.anaszewski@...il.com, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] leds: core: Fix LED_COLOR_MAX_ID

On Wed 2019-10-02 11:34:00, Dan Murphy wrote:
> The LED_COLOR_MAX_ID is incorrect.  THe MAX_ID should
> be the last COLOR_ID in the list.  If an array was allocate
> with MAX_ID the allocation would be correct but the meaning
> is wrong.
> 
> So for array allocation the code should use LED_NUM_COLOR_IDS
> which will allocate MAX_ID + 1.  Whent the code needs to validate
> that the color ID is not out of bounds then the code should use
> LED_COLOR_MAX_ID.

Renaming original define might have been okay. Having two defines is
not. I'd say we can keep it as is...

								Pavel
								
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ