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: <20190903112558.GB6247@sirena.co.uk>
Date:   Tue, 3 Sep 2019 12:25:58 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Yizhuo <yzhai003@....edu>
Cc:     csong@...ucr.edu, zhiyunq@...ucr.edu,
        Liam Girdwood <lgirdwood@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: pfuze100-regulator: Variable "val" in
 pfuze100_regulator_probe() could be uninitialized

On Mon, Sep 02, 2019 at 03:10:47PM -0700, Yizhuo wrote:
> In function pfuze100_regulator_probe(), variable "val" could be
> initialized if regmap_read() fails. However, "val" is used to
> decide the control flow later in the if statement, which is
> potentially unsafe.

>  		struct regulator_desc *desc;
> -		int val;
> +		int val = 0;

This just unconditionally assings a value to this variable which will
stop any warnings but there's no analysis explaining why this is a good
fix - are we actually forgetting to check something we should be
checking, are we sure that this is the correct value to use?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ