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 20:03:18.000000000 +0000 +++ xz-utils-5.1.1alpha+20120614/debian/changelog 2012-10-11 22:38:38.000000000 +0000 @@ -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 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 1970-01-01 00:00:00.000000000 +0000 +++ xz-utils-5.1.1alpha+20120614/debian/patches/decoder-check-first-0x00 2012-10-11 22:38:38.000000000 +0000 @@ -0,0 +1,69 @@ +From: Lasse Collin +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 +--- + 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 LZMA_STREAM_END; + } + + +-- +1.7.9.6 (Apple Git-31.1) + diff -Nru xz-utils-5.1.1alpha+20120614/debian/patches/man-date xz-utils-5.1.1alpha+20120614/debian/patches/man-date --- xz-utils-5.1.1alpha+20120614/debian/patches/man-date 1970-01-01 00:00:00.000000000 +0000 +++ xz-utils-5.1.1alpha+20120614/debian/patches/man-date 2012-10-11 22:38:38.000000000 +0000 @@ -0,0 +1,25 @@ +From: Lasse Collin +Date: Fri, 22 Jun 2012 14:34:03 +0300 +Subject: xz: Update man page date to match the latest update. + +Signed-off-by: Jonathan Nieder +--- + src/xz/xz.1 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/xz/xz.1 b/src/xz/xz.1 +index 3ff89f0..cb8cd1e 100644 +--- a/src/xz/xz.1 ++++ b/src/xz/xz.1 +@@ -5,7 +5,7 @@ + .\" This file has been put into the public domain. + .\" You can do whatever you want with this file. + .\" +-.TH XZ 1 "2011-04-11" "Tukaani" "XZ Utils" ++.TH XZ 1 "2012-05-27" "Tukaani" "XZ Utils" + . + .SH NAME + xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files +-- +1.7.9.6 (Apple Git-31.1) + diff -Nru xz-utils-5.1.1alpha+20120614/debian/patches/man-xz-lvv-minver xz-utils-5.1.1alpha+20120614/debian/patches/man-xz-lvv-minver --- xz-utils-5.1.1alpha+20120614/debian/patches/man-xz-lvv-minver 1970-01-01 00:00:00.000000000 +0000 +++ xz-utils-5.1.1alpha+20120614/debian/patches/man-xz-lvv-minver 2012-10-11 22:38:38.000000000 +0000 @@ -0,0 +1,55 @@ +From: Lasse Collin +Date: Sun, 1 Jul 2012 18:44:33 +0300 +Subject: xz: Update the man page about the new field in --robot -lvv. + +Signed-off-by: Jonathan Nieder +--- + src/xz/xz.1 | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/src/xz/xz.1 b/src/xz/xz.1 +index cb8cd1e..4da09ba 100644 +--- a/src/xz/xz.1 ++++ b/src/xz/xz.1 +@@ -5,7 +5,7 @@ + .\" This file has been put into the public domain. + .\" You can do whatever you want with this file. + .\" +-.TH XZ 1 "2012-05-27" "Tukaani" "XZ Utils" ++.TH XZ 1 "2012-07-01" "Tukaani" "XZ Utils" + . + .SH NAME + xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files +@@ -1889,6 +1889,14 @@ or + .B no + indicating if all block headers have both compressed size and + uncompressed size stored in them ++.PP ++.I Since ++.B xz ++.I 5.1.2alpha: ++.IP 4. 4 ++Minimum ++.B xz ++version required to decompress the file + .RE + .PD + .PP +@@ -1939,6 +1947,14 @@ or + .B no + indicating if all block headers have both compressed size and + uncompressed size stored in them ++.PP ++.I Since ++.B xz ++.I 5.1.2alpha: ++.IP 12. 4 ++Minimum ++.B xz ++version required to decompress the file + .RE + .PD + .PP +-- +1.7.9.6 (Apple Git-31.1) + diff -Nru xz-utils-5.1.1alpha+20120614/debian/patches/series xz-utils-5.1.1alpha+20120614/debian/patches/series --- xz-utils-5.1.1alpha+20120614/debian/patches/series 2012-06-16 11:30:37.000000000 +0000 +++ xz-utils-5.1.1alpha+20120614/debian/patches/series 2012-10-11 22:38:38.000000000 +0000 @@ -2,3 +2,7 @@ abi-version-script abi-liblzma2-compat configure-liblzma2-compat +man-date +man-xz-lvv-minver +xz-lvv-empty-block-minver +decoder-check-first-0x00 diff -Nru xz-utils-5.1.1alpha+20120614/debian/patches/xz-lvv-empty-block-minver xz-utils-5.1.1alpha+20120614/debian/patches/xz-lvv-empty-block-minver --- xz-utils-5.1.1alpha+20120614/debian/patches/xz-lvv-empty-block-minver 1970-01-01 00:00:00.000000000 +0000 +++ xz-utils-5.1.1alpha+20120614/debian/patches/xz-lvv-empty-block-minver 2012-10-11 22:38:38.000000000 +0000 @@ -0,0 +1,38 @@ +From: Lasse Collin +Date: Wed, 4 Jul 2012 19:58:23 +0300 +Subject: xz: Fix the version number printed by xz -lvv. + +The decoder bug was fixed in 5.0.2 instead of 5.0.3. + +Signed-off-by: Jonathan Nieder +--- + src/xz/list.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/xz/list.c b/src/xz/list.c +index e71fbe2..a9e0adb 100644 +--- a/src/xz/list.c ++++ b/src/xz/list.c +@@ -482,7 +482,7 @@ parse_block_header(file_pair *pair, const lzma_index_iter *iter, + // Determine the minimum XZ Utils version that supports this Block. + // + // Currently the only thing that 5.0.0 doesn't support is empty +- // LZMA2 Block. This bug was fixed in 5.0.3. ++ // LZMA2 Block. This decoder bug was fixed in 5.0.2. + { + size_t i = 0; + while (filters[i + 1].id != LZMA_VLI_UNKNOWN) +@@ -490,8 +490,8 @@ parse_block_header(file_pair *pair, const lzma_index_iter *iter, + + if (filters[i].id == LZMA_FILTER_LZMA2 + && iter->block.uncompressed_size == 0 +- && xfi->min_version < 50000032U) +- xfi->min_version = 50000032U; ++ && xfi->min_version < 50000022U) ++ xfi->min_version = 50000022U; + } + + // Convert the filter chain to human readable form. +-- +1.7.9.6 (Apple Git-31.1) + diff -Nru xz-utils-5.1.1alpha+20120614/debian/xz-utils.README.Debian xz-utils-5.1.1alpha+20120614/debian/xz-utils.README.Debian --- xz-utils-5.1.1alpha+20120614/debian/xz-utils.README.Debian 2012-06-16 10:58:14.000000000 +0000 +++ xz-utils-5.1.1alpha+20120614/debian/xz-utils.README.Debian 2012-10-11 22:38:38.000000000 +0000 @@ -3,8 +3,9 @@ Contents: 1. History - 2. LZMA Utils compatibility - 3. Configuration + 2. Differences from standard XZ Utils + 3. LZMA Utils compatibility + 4. Configuration History ------- @@ -14,6 +15,48 @@ of magic number, but it gets enough use to still need to be supported. See /usr/share/doc/xz-utils/history.txt.gz for the full story. +Differences from standard XZ Utils +---------------------------------- + +XZ Utils 5.1.y has some experimental features which are disabled in +Debian to allow interfaces to evolve. Debian liblzma is also modified +to avoid breakage when the same process loads liblzma2 from Debian 6.0 +(squeeze) and liblzma5. + +abi-threaded-encoder + Disable threaded compression in liblzma and xz. + +abi-version-script + liblzma: Do not pretend to satisfy dependencies on XZ_5.1.1alpha. + +abi-liblzma2-compat, configure-liblzma2-compat + Do not check reserved fields past the historical end of the + lzma_stream structure if liblzma.so.2 is loaded in the same + process image. Likewise when linked statically. + (See bug #649522.) + +man-date, man-xz-lvv-minver (from upstream) + Document the "Minimum version required to decompress" field of + "xz --robot -v -v --list" output. + +xz-lvv-empty-block-minver (from upstream) + Fix the version number printed by "xz -lvv" for files with Blocks + of zero uncompressed_size: the decoder bug preventing reading such + files was fixed in xz 5.0.2, not 5.0.3. + +decoder-check-first-0x00 (from upstream) + Check that the first byte of range encoded data is zero to catch + broken files sooner. + +Changes in 5.1.2alpha not applied: + + Docs: Language fix to 01_compress_easy.c + xz: Add incomplete support for --block-list + INSTALL: Document --enable-symbol-versions + configure: Add a comment about *-linux tuples for clarity + TODO: Warn that threads and fork() do not mix well + Bump the version number and update NEWS for 5.1.2alpha + LZMA Utils compatibility ------------------------ @@ -44,4 +87,4 @@ See the "Memory usage" section of the xz(1) manual page for details. - -- Jonathan Nieder Fri, 18 May 2012 01:14:16 -0500 + -- Jonathan Nieder Mon, 10 Sep 2012 14:35:27 -0700