From: Paul Eggert Date: Sun, 18 Mar 2012 18:07:02 +0000 (-0700) Subject: gzip: fix nondeterministic compression results X-Git-Tag: v1.5~6 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=0a284baeaedca68017f46d2646e4c921aa98a90d;p=debian%2Fgzip gzip: fix nondeterministic compression results Reported by Jakub Wilk in . * deflate.c (fill_window): Don't let garbage pollute the dictionary. --- diff --git a/deflate.c b/deflate.c index 6c19552..5405f10 100644 --- a/deflate.c +++ b/deflate.c @@ -571,6 +571,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; }