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]
Date:	Fri, 15 Feb 2013 17:52:26 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Peter Huewe <peterhuewe@....de>
Cc:	Rupesh Gujare <rupesh.gujare@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/7 v2] staging/ozwpan: Fix NULL vs zero in ozeltbuf.c
 (sparse warning)

On Fri, Feb 15, 2013 at 03:22:24PM +0100, Peter Huewe wrote:
> This patch fixes the warning "Using plain integer as NULL pointer",
> generated by sparse, by replacing the offending 0s with NULL.
> 
> If the initialization with NULL was unnecessary (due to unconditional
> assignment before first use) it was removed.
> 
> Signed-off-by: Peter Huewe <peterhuewe@....de>
> ---
> @@ -151,7 +151,7 @@ int oz_elt_stream_create(struct oz_elt_buf *buf, u8 id, int max_buf_count)
>  int oz_elt_stream_delete(struct oz_elt_buf *buf, u8 id)
>  {
>  	struct list_head *e;
> -	struct oz_elt_stream *st;
> +	struct oz_elt_stream *st = NULL;
>  	oz_trace("oz_elt_stream_delete(0x%x)\n", id);
>  	spin_lock_bh(&buf->lock);
>  	e = buf->stream_list.next;

You changed the code here.  The original code would crash if
buf->stream_list was empty.  I don't if that can happen, but I still
consider it a bug fix.

Good job, but next time you mention it in the changelog.

You've fixed a couple of these uninitialized variable bugs recently.
Is this is a clang warning?  GCC doesn't catch it.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ