Package: release.debian.org
User: release.debian@packages.debian.org
Usertags: unblock
Tags: wheezy
Hi,
Unfortunately there has not been a stable release on the 5.1.y branch
of XZ Utils. This update is an attempt to make the best of what we
have, by:
- in existing features, matching behavior of the upstream master
branch as closely as possible
- not adding any new features
- documenting the relationship to upstream (patches applied
and patches not applied) in README.Debian
I've been using these changes for a couple of months now. Not
uploaded yet, so I can make small tweaks if you have good ideas for
some. Diffstat with patches applied, excluding debian/patches:
debian/changelog | 15 ++
debian/xz-utils.README.Debian | 49 ++--
src/liblzma/lzma/lzma_decoder.c|8 -
src/liblzma/rangecoder/range_decoder.h | 12 ++--
src/xz/list.c |6 ++--
src/xz/xz.1| 18 +++-
6 files changed, 96 insertions(+), 12 deletions(-)
debdiff attached. Thoughts?
Thanks for your hard work,
Jonathan
diff -Nru xz-utils-5.1.1alpha+20120614/debian/changelog
xz-utils-5.1.1alpha+20120614/debian/changelog
--- xz-utils-5.1.1alpha+20120614/debian/changelog 2012-06-16
13:03:18.0 -0700
+++ xz-utils-5.1.1alpha+20120614/debian/changelog 2012-09-10
14:35:33.0 -0700
@@ -1,3 +1,18 @@
+xz-utils (5.1.1alpha+20120614-2) unstable; urgency=low
+
+ * Apply fixes from 5.1.2alpha. Closes: #685220.
+- liblzma: report a LZMA_DATA_ERROR when range encoded data starts
+ with a nonzero byte. This is a sanity check to catch malformed
+ files that no known encoders produce.
+- xz -v -v --list: Support for decompressing blocks with
+ zero-length uncompressed data was added in xz 5.0.2, not 5.0.3.
+- xz.1: xz --robot -v -v --list gained a minimum xz version to
+ decompress field.
+ * xz-utils/README.Debian: Document differences from upstream.
+Closes: #685217.
+
+ -- Jonathan Nieder jrnie...@gmail.com Mon, 10 Sep 2012 14:35:33 -0700
+
xz-utils (5.1.1alpha+20120614-1) unstable; urgency=low
* New snapshot, taken from upstream commit f1675f76.
diff -Nru xz-utils-5.1.1alpha+20120614/debian/patches/decoder-check-first-0x00
xz-utils-5.1.1alpha+20120614/debian/patches/decoder-check-first-0x00
--- xz-utils-5.1.1alpha+20120614/debian/patches/decoder-check-first-0x00
1969-12-31 16:00:00.0 -0800
+++ xz-utils-5.1.1alpha+20120614/debian/patches/decoder-check-first-0x00
2012-09-10 14:10:45.0 -0700
@@ -0,0 +1,69 @@
+From: Lasse Collin lasse.col...@tukaani.org
+Date: Thu, 28 Jun 2012 10:47:49 +0300
+Subject: liblzma: Check that the first byte of range encoded data is 0x00.
+
+It is just to be more pedantic and thus perhaps catch broken
+files slightly earlier.
+
+Signed-off-by: Jonathan Nieder jrnie...@gmail.com
+---
+ src/liblzma/lzma/lzma_decoder.c|8 ++--
+ src/liblzma/rangecoder/range_decoder.h | 12 +---
+ 2 files changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/src/liblzma/lzma/lzma_decoder.c b/src/liblzma/lzma/lzma_decoder.c
+index 5abbc0d..b8f9317 100644
+--- a/src/liblzma/lzma/lzma_decoder.c
b/src/liblzma/lzma/lzma_decoder.c
+@@ -289,8 +289,12 @@ lzma_decode(lzma_coder *restrict coder, lzma_dict
*restrict dictptr,
+ // Initialization //
+
+
+- if (!rc_read_init(coder-rc, in, in_pos, in_size))
+- return LZMA_OK;
++ {
++ const lzma_ret ret = rc_read_init(
++ coder-rc, in, in_pos, in_size);
++ if (ret != LZMA_STREAM_END)
++ return ret;
++ }
+
+ ///
+ // Variables //
+diff --git a/src/liblzma/rangecoder/range_decoder.h
b/src/liblzma/rangecoder/range_decoder.h
+index fb96180..e0b051f 100644
+--- a/src/liblzma/rangecoder/range_decoder.h
b/src/liblzma/rangecoder/range_decoder.h
+@@ -25,20 +25,26 @@ typedef struct {
+
+
+ /// Reads the first five bytes to initialize the range decoder.
+-static inline bool
++static inline lzma_ret
+ rc_read_init(lzma_range_decoder *rc, const uint8_t *restrict in,
+ size_t *restrict in_pos, size_t in_size)
+ {
+ while (rc-init_bytes_left 0) {
+ if (*in_pos == in_size)
+- return false;
++ return LZMA_OK;
++
++ // The first byte is always 0x00. It could have been omitted
++ // in LZMA2 but it wasn't, so one byte is wasted in every
++ // LZMA2 chunk.
++ if (rc-init_bytes_left == 5 in[*in_pos] != 0x00)
++ return LZMA_DATA_ERROR;
+
+ rc-code = (rc-code 8) | in[*in_pos];
+ ++*in_pos;
+ --rc-init_bytes_left;
+ }
+
+- return true;
++ return