From 6a1bef0f0a7aa43a4bd49fceef0cc44f489d7706 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Mon, 19 Mar 2012 11:07:34 +0100 Subject: [PATCH] patch from upstream for determinism issue --- debian/changelog | 6 ++++++ debian/patches/determinism.diff | 23 +++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 30 insertions(+) create mode 100644 debian/patches/determinism.diff diff --git a/debian/changelog b/debian/changelog index 8156a05..0b6d2c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +gzip (1.4-5) unstable; urgency=low + + * patch from upstream to address determinism issue, closes: #647522 + + -- Bdale Garbee 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 index 0000000..7cd881b --- /dev/null +++ b/debian/patches/determinism.diff @@ -0,0 +1,23 @@ +From 0a284baeaedca68017f46d2646e4c921aa98a90d Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sun, 18 Mar 2012 18:07:02 +0000 +Subject: 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; + } +-- +cgit v0.9.0.2 diff --git a/debian/patches/series b/debian/patches/series index 345aeaa..0685c9b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ getdtablesize-missing.diff rsyncable.diff zless-LESSOPEN.diff sys_stat.in.h.diff +determinism.diff -- 2.30.2