From 9c3a5830218c4e7fff23b8fc4386269db77a03a9 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Fri, 9 Sep 2011 23:24:52 -0700 Subject: zlib 1.2.2.4 --- inftrees.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'inftrees.c') diff --git a/inftrees.c b/inftrees.c index 471f735..61d52f6 100644 --- a/inftrees.c +++ b/inftrees.c @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.2.3 Copyright 1995-2005 Mark Adler "; + " inflate 1.2.2.4 Copyright 1995-2005 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ unsigned short FAR *work; 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 66, 71}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 206, 69}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, @@ -134,7 +134,7 @@ unsigned short FAR *work; left -= count[len]; if (left < 0) return -1; /* over-subscribed */ } - if (left > 0 && (type == CODES || (codes - count[0] != 1))) + if (left > 0 && (type == CODES || max != 1)) return -1; /* incomplete set */ /* generate offsets into symbol table for each length for sorting */ @@ -232,6 +232,7 @@ unsigned short FAR *work; /* replicate for those indices with low len bits equal to huff */ incr = 1U << (len - drop); fill = 1U << curr; + min = fill; /* save offset to next table */ do { fill -= incr; next[(huff >> drop) + fill] = this; @@ -262,7 +263,7 @@ unsigned short FAR *work; drop = root; /* increment past last table */ - next += (unsigned)(1U << curr); + next += min; /* here min is 1 << curr */ /* determine length of next table */ curr = len - drop; -- cgit v1.2.3-55-g6feb