[Zlib-devel] (no subject)

Евгений Эксаревский zhekae at inbox.ru
Fri Jul 24 09:21:52 EDT 2009


Hello All!

Not sure I need to write there because I already wrote about this bug during registration...


I found a bug in zlib: assert in longest_match_fast when compiled with -DDEBUG and -DFASTEST.
I have a test to reproduce the bug.

The fix is trivial:

--- deflate_orig.c      Mon Jul 18 02:27:31 2005
+++ deflate.c   Fri Jul 17 06:12:34 2009
@@ -1469,6 +1469,7 @@ local block_state deflate_fast(s, flush)
         /* Insert the string window[strstart .. strstart+2] in the
          * dictionary, and set hash_head to the head of the hash chain:
          */
+        hash_head = NIL;
         if (s->lookahead >= MIN_MATCH) {
             INSERT_STRING(s, s->strstart, hash_head);
         }






More information about the Zlib-devel mailing list