patch from upstream for determinism issue
authorBdale Garbee <bdale@gag.com>
Mon, 19 Mar 2012 10:07:34 +0000 (11:07 +0100)
committerBdale Garbee <bdale@gag.com>
Mon, 19 Mar 2012 10:07:34 +0000 (11:07 +0100)
debian/changelog
debian/patches/determinism.diff [new file with mode: 0644]
debian/patches/series

index 8156a05d4b61d9c4e3d65cf96cfc7a6d4fdab2de..0b6d2c96dda2716ee7d05ced7fc89d904aab8161 100644 (file)
@@ -1,3 +1,9 @@
+gzip (1.4-5) unstable; urgency=low
+
+  * patch from upstream to address determinism issue, closes: #647522
+
+ -- Bdale Garbee <bdale@gag.com>  Mon, 19 Mar 2012 11:07:22 +0100
+
 gzip (1.4-4) unstable; urgency=low
 
   * enable hardening build flags, closes: #664499
diff --git a/debian/patches/determinism.diff b/debian/patches/determinism.diff
new file mode 100644 (file)
index 0000000..7cd881b
--- /dev/null
@@ -0,0 +1,23 @@
+From 0a284baeaedca68017f46d2646e4c921aa98a90d Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Sun, 18 Mar 2012 18:07:02 +0000
+Subject: gzip: fix nondeterministic compression results
+
+Reported by Jakub Wilk in <http://bugs.debian.org/647522>.
+* 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;
+         }
+--
+cgit v0.9.0.2
index 345aeaad3653e0296e43cba940fa03381b81f161..0685c9b98646c9377894c4fadab057d77dba3baa 100644 (file)
@@ -2,3 +2,4 @@ getdtablesize-missing.diff
 rsyncable.diff
 zless-LESSOPEN.diff
 sys_stat.in.h.diff
+determinism.diff