wok rev 933

Linux: fix lzma 1 byte header
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jun 19 16:54:03 2008 +0000 (2008-06-19)
parents 26d477618246
children 8bae1c055976
files linux/stuff/linux-lzma-2.6.25.5.u
line diff
     1.1 --- a/linux/stuff/linux-lzma-2.6.25.5.u	Thu Jun 19 14:54:41 2008 +0200
     1.2 +++ b/linux/stuff/linux-lzma-2.6.25.5.u	Thu Jun 19 16:54:03 2008 +0000
     1.3 @@ -1444,7 +1444,7 @@
     1.4  
     1.5  --- linux-2.6.25.5/lib/decompress_unlzma.c
     1.6  +++ linux-2.6.25.5/lib/decompress_unlzma.c
     1.7 -@@ -0,0 +1,607 @@
     1.8 +@@ -0,0 +1,608 @@
     1.9  +/* Lzma decompressor for Linux kernel. Shamelessly snarfed
    1.10  + * from busybox 1.1.1
    1.11  + *
    1.12 @@ -1778,7 +1778,8 @@
    1.13  +
    1.14  +	rc_init(&rc, fill, inbuf, in_len);
    1.15  +
    1.16 -+	header.dict_size = header.dst_size = in_len;
    1.17 ++	header.dict_size = (uint32_t) -1L;
    1.18 ++	header.dst_size  = (uint64_t) -1LL;
    1.19  +	if (inbuf && in_len > 0 && inbuf[0] == 0) {
    1.20  +		const int LZMA_LC = 3, LZMA_LP = 0, LZMA_PB = 2;
    1.21  +		header.pos = (LZMA_PB * 45) + (LZMA_LP * 5) + LZMA_LC;
    1.22 @@ -2034,7 +2035,7 @@
    1.23  +					writebb((char*)buffer, header.dict_size);
    1.24  +				}
    1.25  +				len--;
    1.26 -+			} while (len != 0 && buffer_pos < header.dst_size);
    1.27 ++			} while (len != 0 && (global_pos + buffer_pos) < header.dst_size);
    1.28  +		}
    1.29  +	}
    1.30  +