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: <19201.1385372189@warthog.procyon.org.uk>
Date:	Mon, 25 Nov 2013 09:36:29 +0000
From:	David Howells <dhowells@...hat.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	dhowells@...hat.com, keyrings@...ux-nfs.org,
	linux-security-module@...r.kernel.org,
	"open list\:NFS\, SUNRPC\, AND..." <linux-nfs@...r.kernel.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: assoc_array.c uninitialized variable (was: Re: [PATCH 02/10] Add a generic associative array implementation.)

Geert Uytterhoeven <geert@...ux-m68k.org> wrote:

> > +       int slot, next_slot, free_slot, i, j;
> 
> lib/assoc_array.c: In function ‘assoc_array_insert_into_terminal_node’:
> lib/assoc_array.c:502: warning: ‘j’ may be used uninitialized in this function

What compiler are you using?  Mine doesn't show this.

Technically, the compiler is correct - but we should never see the variable
undefined following the found_slot_for_multiple_occupancy unless the tree
changes under us. Out of a set of N+1 integers that can only be in the range
0..N-1 there must be at least two the same.

I guess I could preclear j to make the warning go away.

David
--
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