patch for zdiff man page
[debian/gzip] / deflate.c
index 1b3ac524b59f823ac3897a21e5f16d6d21d246e4..a551fa3a409d640905fed9e329d10038731f13a5 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -581,6 +581,8 @@ local void fill_window()
         n = read_buf((char*)window+strstart+lookahead, more);
         if (n == 0 || n == (unsigned)EOF) {
             eofile = 1;
+            /* Don't let garbage pollute the dictionary.  */
+            memzero (window + strstart + lookahead, MIN_MATCH - 1);
         } else {
             lookahead += n;
         }