|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] XZ decompressor: Fix decoding of empty LZ
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1316712828 -3600
# Node ID db1ea4b127cd99bcf6fa731ac3865c1988b56ae7
# Parent 28147fd781af7cf8717d18165fecf1442ea77db3
XZ decompressor: Fix decoding of empty LZMA2 streams
From: Lasse Collin <lasse.collin@xxxxxxxxxxx>
The old code considered valid empty LZMA2 streams to be corrupt.
Note that a typical empty .xz file has no LZMA2 data at all,
and thus most .xz files having no uncompressed data are handled
correctly even without this fix.
Signed-off-by: Lasse Collin <lasse.collin@xxxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
diff -r 28147fd781af -r db1ea4b127cd xen/common/xz/dec_lzma2.c
--- a/xen/common/xz/dec_lzma2.c Thu Sep 22 18:32:34 2011 +0100
+++ b/xen/common/xz/dec_lzma2.c Thu Sep 22 18:33:48 2011 +0100
@@ -969,6 +969,9 @@
*/
tmp = b->in[b->in_pos++];
+ if (tmp == 0x00)
+ return XZ_STREAM_END;
+
if (tmp >= 0xE0 || tmp == 0x01) {
s->lzma2.need_props = true;
s->lzma2.need_dict_reset = false;
@@ -1001,9 +1004,6 @@
lzma_reset(s);
}
} else {
- if (tmp == 0x00)
- return XZ_STREAM_END;
-
if (tmp > 0x02)
return XZ_DATA_ERROR;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] XZ decompressor: Fix decoding of empty LZMA2 streams,
Xen patchbot-unstable <=
|
|
|
|
|