]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
deflate: avoid use of uninitialized variable
authorNathan Kidd <nkidd@opentext.com>
Thu, 22 May 2014 18:20:44 +0000 (14:20 -0400)
committerJim Kukunas <james.t.kukunas@linux.intel.com>
Sat, 26 Jul 2014 22:53:17 +0000 (15:53 -0700)
(Note emit_match() doesn't currently use the value at all.)

Fixes #4

deflate_medium.c

index ce6bd97d8f468bf31eb8a2468c50c40ea7571c0a..4beada8d85ae5c52fbbb6b03844e1d1f5a9d956e 100644 (file)
@@ -174,7 +174,7 @@ block_state deflate_medium(deflate_state *s, int flush)
     memset(&next_match, 0, sizeof(struct match));
 
     for (;;) {
-        IPos hash_head;       /* head of the hash chain */
+        IPos hash_head = 0;   /* head of the hash chain */
         int bflush;           /* set if current block must be flushed */
         
         /* Make sure that we always have enough lookahead, except