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:   Wed, 23 Nov 2022 00:08:55 +0100
From:   Pavel Machek <pavel@....cz>
To:     Shuah Khan <skhan@...uxfoundation.org>
Cc:     patches@...nsource.cirrus.com, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] leds: leds-wm831x-status: init chip_pdata before access

On Tue 2022-11-22 15:39:35, Shuah Khan wrote:
> On 11/22/22 14:05, Pavel Machek wrote:
> > Hi!
> > 
> > > wm831x_status_probe() accesses status from chip_pdata before
> > > initializing it. Fix it.
> > > 
> > > Signed-off-by: Shuah Khan <skhan@...uxfoundation.org>
> > 
> > Does it? ARRAY_SIZE() will be compile-time constant, no?
> > 
> > What is the bug? Did you test the code?
> > 
> 
> Is ARRAY_SIZE() safe when accessing the status chip_pdata->status?
> I wasn't sure. If so, this change isn't necessary.

I think so. Feel free to quite C standard to prove me wrong :-).

Best regards,
								Pavel

-- 
People of Russia, stop Putin before his war on Ukraine escalates.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ