[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zlib-devel
Subject:    [Zlib-devel] [PATCH 12/15] deflate: avoid use of uninitialized variable
From:       james.t.kukunas () linux ! intel ! com (Jim Kukunas)
Date:       2014-07-28 19:18:32
Message-ID: 1406575115-13308-13-git-send-email-james.t.kukunas () linux ! intel ! com
[Download RAW message or body]

From: Nathan Kidd <nkidd at opentext.com>

(Note emit_match() doesn't currently use the value at all.)

Fixes #4
---
 deflate_medium.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/deflate_medium.c b/deflate_medium.c
index ce6bd97..4beada8 100644
--- a/deflate_medium.c
+++ b/deflate_medium.c
@@ -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
-- 
1.9.3




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic