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: <20220320173747.GH3457@minyard.net>
Date:   Sun, 20 Mar 2022 12:37:47 -0500
From:   Corey Minyard <minyard@....org>
To:     trix@...hat.com
Cc:     nathan@...nel.org, ndesaulniers@...gle.com,
        openipmi-developer@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] ipmi: initialize len variable

On Sun, Mar 20, 2022 at 06:59:54AM -0700, trix@...hat.com wrote:
> From: Tom Rix <trix@...hat.com>
> 
> Clang static analysis reports this issue
> ipmi_ssif.c:1731:3: warning: 4th function call
>   argument is an uninitialized value
>   dev_info(&ssif_info->client->dev,
>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> The 4th parameter is the 'len' variable.
> len is only set by a successful call to do_cmd().
> Initialize to len 0.

Thanks, it's queued for next release..

-corey

> 
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
>  drivers/char/ipmi/ipmi_ssif.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
> index ba779f1abb5b2..f199cc1948446 100644
> --- a/drivers/char/ipmi/ipmi_ssif.c
> +++ b/drivers/char/ipmi/ipmi_ssif.c
> @@ -1625,7 +1625,7 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
>  	unsigned char     *resp;
>  	struct ssif_info   *ssif_info;
>  	int               rv = 0;
> -	int               len;
> +	int               len = 0;
>  	int               i;
>  	u8		  slave_addr = 0;
>  	struct ssif_addr_info *addr_info = NULL;
> -- 
> 2.26.3
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ