diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:17:17 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:17:17 -0700 |
commit | ebd3c2c0e734fc99a1360014ea52ed04fe6aade4 (patch) | |
tree | 427d4866aced2a78526bab76f8af9b8bc6b4d789 | |
parent | ff11b0a61f7345572ff2e413173d3179486162f2 (diff) | |
download | zlib-1.0.5.tar.gz zlib-1.0.5.tar.bz2 zlib-1.0.5.zip |
zlib 1.0.5v1.0.5
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | Makefile.in | 4 | ||||
-rw-r--r-- | README | 17 | ||||
-rw-r--r-- | deflate.c | 5 | ||||
-rw-r--r-- | infblock.c | 11 | ||||
-rw-r--r-- | inftrees.c | 48 | ||||
-rw-r--r-- | zlib.def | 2 | ||||
-rw-r--r-- | zlib.h | 6 | ||||
-rw-r--r-- | zlib.rc | 6 |
10 files changed, 61 insertions, 49 deletions
@@ -1,6 +1,13 @@ | |||
1 | 1 | ||
2 | ChangeLog file for zlib | 2 | ChangeLog file for zlib |
3 | 3 | ||
4 | Changes in 1.0.5 (3 Jan 98) | ||
5 | - Fix inflate to terminate gracefully when fed corrupted or invalid data | ||
6 | - Use const for rommable constants in inflate | ||
7 | - Eliminate memory leaks on error conditions in inflate | ||
8 | - Removed some vestigial code in inflate | ||
9 | - Update web address in README | ||
10 | |||
4 | Changes in 1.0.4 (24 Jul 96) | 11 | Changes in 1.0.4 (24 Jul 96) |
5 | - In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF | 12 | - In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF |
6 | bit, so the decompressor could decompress all the correct data but went | 13 | bit, so the decompressor could decompress all the correct data but went |
@@ -1,5 +1,5 @@ | |||
1 | # Makefile for zlib | 1 | # Makefile for zlib |
2 | # Copyright (C) 1995-1996 Jean-loup Gailly. | 2 | # Copyright (C) 1995-1998 Jean-loup Gailly. |
3 | # For conditions of distribution and use, see copyright notice in zlib.h | 3 | # For conditions of distribution and use, see copyright notice in zlib.h |
4 | 4 | ||
5 | # To compile and test, type: | 5 | # To compile and test, type: |
@@ -22,7 +22,7 @@ CFLAGS=-O | |||
22 | LDFLAGS=-L. -lz | 22 | LDFLAGS=-L. -lz |
23 | LDSHARED=$(CC) | 23 | LDSHARED=$(CC) |
24 | 24 | ||
25 | VER=1.0.4 | 25 | VER=1.0.5 |
26 | LIBS=libz.a | 26 | LIBS=libz.a |
27 | 27 | ||
28 | AR=ar rc | 28 | AR=ar rc |
diff --git a/Makefile.in b/Makefile.in index 71b269b..b216ba7 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -1,5 +1,5 @@ | |||
1 | # Makefile for zlib | 1 | # Makefile for zlib |
2 | # Copyright (C) 1995-1996 Jean-loup Gailly. | 2 | # Copyright (C) 1995-1998 Jean-loup Gailly. |
3 | # For conditions of distribution and use, see copyright notice in zlib.h | 3 | # For conditions of distribution and use, see copyright notice in zlib.h |
4 | 4 | ||
5 | # To compile and test, type: | 5 | # To compile and test, type: |
@@ -22,7 +22,7 @@ CFLAGS=-O | |||
22 | LDFLAGS=-L. -lz | 22 | LDFLAGS=-L. -lz |
23 | LDSHARED=$(CC) | 23 | LDSHARED=$(CC) |
24 | 24 | ||
25 | VER=1.0.4 | 25 | VER=1.0.5 |
26 | LIBS=libz.a | 26 | LIBS=libz.a |
27 | 27 | ||
28 | AR=ar rc | 28 | AR=ar rc |
@@ -1,4 +1,4 @@ | |||
1 | zlib 1.0.4 is a general purpose data compression library. All the code | 1 | zlib 1.0.5 is a general purpose data compression library. All the code |
2 | is reentrant (thread safe). The data format used by the zlib library | 2 | is reentrant (thread safe). The data format used by the zlib library |
3 | is described by RFCs (Request for Comments) 1950 to 1952 in the files | 3 | is described by RFCs (Request for Comments) 1950 to 1952 in the files |
4 | ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate | 4 | ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate |
@@ -18,16 +18,13 @@ makefiles such as Makefile.msc; for VMS, use Make_vms.com or descrip.mms. | |||
18 | 18 | ||
19 | Questions about zlib should be sent to <zlib@quest.jpl.nasa.gov> or, | 19 | Questions about zlib should be sent to <zlib@quest.jpl.nasa.gov> or, |
20 | if this fails, to the addresses given below in the Copyright section. | 20 | if this fails, to the addresses given below in the Copyright section. |
21 | The zlib home page is http://quest.jpl.nasa.gov/zlib/ | 21 | The zlib home page is http://www.cdrom.com/pub/infozip/zlib/ |
22 | 22 | ||
23 | The changes made in version 1.0.4 are documented in the file ChangeLog. | 23 | The changes made in version 1.0.5 are documented in the file ChangeLog. |
24 | The main changes since 1.0.3 are: | 24 | The main changes since 1.0.4 are: |
25 | 25 | ||
26 | - In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF | 26 | - Fix inflate to terminate gracefully when fed corrupted or invalid data |
27 | bit, so the decompressor could decompress all the correct data but went | 27 | - Use const for rommable constants in inflate |
28 | on to attempt decompressing extra garbage data. This affected minigzip too. | ||
29 | - zlibVersion and gzerror return const char* (needed for DLL) | ||
30 | - port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno) | ||
31 | 28 | ||
32 | 29 | ||
33 | A Perl interface to zlib written by Paul Marquess <pmarquess@bfsec.bt.co.uk> | 30 | A Perl interface to zlib written by Paul Marquess <pmarquess@bfsec.bt.co.uk> |
@@ -68,7 +65,7 @@ Acknowledgments: | |||
68 | 65 | ||
69 | Copyright notice: | 66 | Copyright notice: |
70 | 67 | ||
71 | (C) 1995-1996 Jean-loup Gailly and Mark Adler | 68 | (C) 1995-1998 Jean-loup Gailly and Mark Adler |
72 | 69 | ||
73 | This software is provided 'as-is', without any express or implied | 70 | This software is provided 'as-is', without any express or implied |
74 | warranty. In no event will the authors be held liable for any damages | 71 | warranty. In no event will the authors be held liable for any damages |
@@ -1,5 +1,5 @@ | |||
1 | /* deflate.c -- compress data using the deflation algorithm | 1 | /* deflate.c -- compress data using the deflation algorithm |
2 | * Copyright (C) 1995-1996 Jean-loup Gailly. | 2 | * Copyright (C) 1995-1998 Jean-loup Gailly. |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -47,11 +47,10 @@ | |||
47 | * | 47 | * |
48 | */ | 48 | */ |
49 | 49 | ||
50 | /* $Id: deflate.c,v 1.15 1996/07/24 13:40:58 me Exp $ */ | ||
51 | 50 | ||
52 | #include "deflate.h" | 51 | #include "deflate.h" |
53 | 52 | ||
54 | char deflate_copyright[] = " deflate 1.0.4 Copyright 1995-1996 Jean-loup Gailly "; | 53 | char deflate_copyright[] = " deflate 1.0.5 Copyright 1995-1998 Jean-loup Gailly "; |
55 | /* | 54 | /* |
56 | If you use the zlib library in a product, an acknowledgment is welcome | 55 | If you use the zlib library in a product, an acknowledgment is welcome |
57 | in the documentation of your product. If for some reason you cannot | 56 | in the documentation of your product. If for some reason you cannot |
@@ -1,5 +1,5 @@ | |||
1 | /* infblock.c -- interpret and process block types to last block | 1 | /* infblock.c -- interpret and process block types to last block |
2 | * Copyright (C) 1995-1996 Mark Adler | 2 | * Copyright (C) 1995-1998 Mark Adler |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -12,7 +12,7 @@ | |||
12 | struct inflate_codes_state {int dummy;}; /* for buggy compilers */ | 12 | struct inflate_codes_state {int dummy;}; /* for buggy compilers */ |
13 | 13 | ||
14 | /* Table for deflate from PKZIP's appnote.txt. */ | 14 | /* Table for deflate from PKZIP's appnote.txt. */ |
15 | local uInt border[] = { /* Order of the bit length code lengths */ | 15 | local const uInt border[] = { /* Order of the bit length code lengths */ |
16 | 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; | 16 | 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; |
17 | 17 | ||
18 | /* | 18 | /* |
@@ -224,8 +224,6 @@ int r; | |||
224 | } | 224 | } |
225 | #endif | 225 | #endif |
226 | t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f); | 226 | t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f); |
227 | if (t < 19) | ||
228 | t = 19; | ||
229 | if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL) | 227 | if ((s->sub.trees.blens = (uIntf*)ZALLOC(z, t, sizeof(uInt))) == Z_NULL) |
230 | { | 228 | { |
231 | r = Z_MEM_ERROR; | 229 | r = Z_MEM_ERROR; |
@@ -249,6 +247,7 @@ int r; | |||
249 | &s->sub.trees.tb, z); | 247 | &s->sub.trees.tb, z); |
250 | if (t != Z_OK) | 248 | if (t != Z_OK) |
251 | { | 249 | { |
250 | ZFREE(z, s->sub.trees.blens); | ||
252 | r = t; | 251 | r = t; |
253 | if (r == Z_DATA_ERROR) | 252 | if (r == Z_DATA_ERROR) |
254 | s->mode = BAD; | 253 | s->mode = BAD; |
@@ -287,6 +286,8 @@ int r; | |||
287 | if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || | 286 | if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || |
288 | (c == 16 && i < 1)) | 287 | (c == 16 && i < 1)) |
289 | { | 288 | { |
289 | inflate_trees_free(s->sub.trees.tb, z); | ||
290 | ZFREE(z, s->sub.trees.blens); | ||
290 | s->mode = BAD; | 291 | s->mode = BAD; |
291 | z->msg = (char*)"invalid bit length repeat"; | 292 | z->msg = (char*)"invalid bit length repeat"; |
292 | r = Z_DATA_ERROR; | 293 | r = Z_DATA_ERROR; |
@@ -314,6 +315,7 @@ int r; | |||
314 | #endif | 315 | #endif |
315 | t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), | 316 | t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), |
316 | s->sub.trees.blens, &bl, &bd, &tl, &td, z); | 317 | s->sub.trees.blens, &bl, &bd, &tl, &td, z); |
318 | ZFREE(z, s->sub.trees.blens); | ||
317 | if (t != Z_OK) | 319 | if (t != Z_OK) |
318 | { | 320 | { |
319 | if (t == (uInt)Z_DATA_ERROR) | 321 | if (t == (uInt)Z_DATA_ERROR) |
@@ -330,7 +332,6 @@ int r; | |||
330 | r = Z_MEM_ERROR; | 332 | r = Z_MEM_ERROR; |
331 | LEAVE | 333 | LEAVE |
332 | } | 334 | } |
333 | ZFREE(z, s->sub.trees.blens); | ||
334 | s->sub.decode.codes = c; | 335 | s->sub.decode.codes = c; |
335 | s->sub.decode.tl = tl; | 336 | s->sub.decode.tl = tl; |
336 | s->sub.decode.td = td; | 337 | s->sub.decode.td = td; |
@@ -1,12 +1,12 @@ | |||
1 | /* inftrees.c -- generate Huffman trees for efficient decoding | 1 | /* inftrees.c -- generate Huffman trees for efficient decoding |
2 | * Copyright (C) 1995-1996 Mark Adler | 2 | * Copyright (C) 1995-1998 Mark Adler |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "zutil.h" | 6 | #include "zutil.h" |
7 | #include "inftrees.h" | 7 | #include "inftrees.h" |
8 | 8 | ||
9 | char inflate_copyright[] = " inflate 1.0.4 Copyright 1995-1996 Mark Adler "; | 9 | char inflate_copyright[] = " inflate 1.0.5 Copyright 1995-1998 Mark Adler "; |
10 | /* | 10 | /* |
11 | If you use the zlib library in a product, an acknowledgment is welcome | 11 | If you use the zlib library in a product, an acknowledgment is welcome |
12 | in the documentation of your product. If for some reason you cannot | 12 | in the documentation of your product. If for some reason you cannot |
@@ -26,8 +26,8 @@ local int huft_build OF(( | |||
26 | uIntf *, /* code lengths in bits */ | 26 | uIntf *, /* code lengths in bits */ |
27 | uInt, /* number of codes */ | 27 | uInt, /* number of codes */ |
28 | uInt, /* number of "simple" codes */ | 28 | uInt, /* number of "simple" codes */ |
29 | uIntf *, /* list of base values for non-simple codes */ | 29 | const uIntf *, /* list of base values for non-simple codes */ |
30 | uIntf *, /* list of extra bits for non-simple codes */ | 30 | const uIntf *, /* list of extra bits for non-simple codes */ |
31 | inflate_huft * FAR*,/* result: starting table */ | 31 | inflate_huft * FAR*,/* result: starting table */ |
32 | uIntf *, /* maximum lookup bits (returns actual) */ | 32 | uIntf *, /* maximum lookup bits (returns actual) */ |
33 | z_streamp )); /* for zalloc function */ | 33 | z_streamp )); /* for zalloc function */ |
@@ -38,18 +38,18 @@ local voidpf falloc OF(( | |||
38 | uInt)); /* size of item */ | 38 | uInt)); /* size of item */ |
39 | 39 | ||
40 | /* Tables for deflate from PKZIP's appnote.txt. */ | 40 | /* Tables for deflate from PKZIP's appnote.txt. */ |
41 | local uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */ | 41 | local const uInt cplens[31] = { /* Copy lengths for literal codes 257..285 */ |
42 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, | 42 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, |
43 | 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; | 43 | 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; |
44 | /* actually lengths - 2; also see note #13 above about 258 */ | 44 | /* see note #13 above about 258 */ |
45 | local uInt cplext[31] = { /* Extra bits for literal codes 257..285 */ | 45 | local const uInt cplext[31] = { /* Extra bits for literal codes 257..285 */ |
46 | 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, | 46 | 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, |
47 | 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 192, 192}; /* 192==invalid */ | 47 | 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}; /* 112==invalid */ |
48 | local uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */ | 48 | local const uInt cpdist[30] = { /* Copy offsets for distance codes 0..29 */ |
49 | 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, | 49 | 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, |
50 | 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, | 50 | 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, |
51 | 8193, 12289, 16385, 24577}; | 51 | 8193, 12289, 16385, 24577}; |
52 | local uInt cpdext[30] = { /* Extra bits for distance codes */ | 52 | local const uInt cpdext[30] = { /* Extra bits for distance codes */ |
53 | 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, | 53 | 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, |
54 | 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, | 54 | 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, |
55 | 12, 12, 13, 13}; | 55 | 12, 12, 13, 13}; |
@@ -99,16 +99,16 @@ local int huft_build(b, n, s, d, e, t, m, zs) | |||
99 | uIntf *b; /* code lengths in bits (all assumed <= BMAX) */ | 99 | uIntf *b; /* code lengths in bits (all assumed <= BMAX) */ |
100 | uInt n; /* number of codes (assumed <= N_MAX) */ | 100 | uInt n; /* number of codes (assumed <= N_MAX) */ |
101 | uInt s; /* number of simple-valued codes (0..s-1) */ | 101 | uInt s; /* number of simple-valued codes (0..s-1) */ |
102 | uIntf *d; /* list of base values for non-simple codes */ | 102 | const uIntf *d; /* list of base values for non-simple codes */ |
103 | uIntf *e; /* list of extra bits for non-simple codes */ | 103 | const uIntf *e; /* list of extra bits for non-simple codes */ |
104 | inflate_huft * FAR *t; /* result: starting table */ | 104 | inflate_huft * FAR *t; /* result: starting table */ |
105 | uIntf *m; /* maximum lookup bits, returns actual */ | 105 | uIntf *m; /* maximum lookup bits, returns actual */ |
106 | z_streamp zs; /* for zalloc function */ | 106 | z_streamp zs; /* for zalloc function */ |
107 | /* Given a list of code lengths and a maximum table size, make a set of | 107 | /* Given a list of code lengths and a maximum table size, make a set of |
108 | tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR | 108 | tables to decode that set of codes. Return Z_OK on success, Z_BUF_ERROR |
109 | if the given code set is incomplete (the tables are still built in this | 109 | if the given code set is incomplete (the tables are still built in this |
110 | case), Z_DATA_ERROR if the input is invalid (all zero length codes or an | 110 | case), Z_DATA_ERROR if the input is invalid (an over-subscribed set of |
111 | over-subscribed set of lengths), or Z_MEM_ERROR if not enough memory. */ | 111 | lengths), or Z_MEM_ERROR if not enough memory. */ |
112 | { | 112 | { |
113 | 113 | ||
114 | uInt a; /* counter for codes of length k */ | 114 | uInt a; /* counter for codes of length k */ |
@@ -190,6 +190,7 @@ z_streamp zs; /* for zalloc function */ | |||
190 | if ((j = *p++) != 0) | 190 | if ((j = *p++) != 0) |
191 | v[x[j]++] = i; | 191 | v[x[j]++] = i; |
192 | } while (++i < n); | 192 | } while (++i < n); |
193 | n = x[g]; /* set n to length of v */ | ||
193 | 194 | ||
194 | 195 | ||
195 | /* Generate the Huffman codes and for each, make the table entries */ | 196 | /* Generate the Huffman codes and for each, make the table entries */ |
@@ -309,7 +310,7 @@ z_streamp z; /* for zfree function */ | |||
309 | r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL, tb, bb, z); | 310 | r = huft_build(c, 19, 19, (uIntf*)Z_NULL, (uIntf*)Z_NULL, tb, bb, z); |
310 | if (r == Z_DATA_ERROR) | 311 | if (r == Z_DATA_ERROR) |
311 | z->msg = (char*)"oversubscribed dynamic bit lengths tree"; | 312 | z->msg = (char*)"oversubscribed dynamic bit lengths tree"; |
312 | else if (r == Z_BUF_ERROR) | 313 | else if (r == Z_BUF_ERROR || *bb == 0) |
313 | { | 314 | { |
314 | inflate_trees_free(*tb, z); | 315 | inflate_trees_free(*tb, z); |
315 | z->msg = (char*)"incomplete dynamic bit lengths tree"; | 316 | z->msg = (char*)"incomplete dynamic bit lengths tree"; |
@@ -332,11 +333,12 @@ z_streamp z; /* for zfree function */ | |||
332 | int r; | 333 | int r; |
333 | 334 | ||
334 | /* build literal/length tree */ | 335 | /* build literal/length tree */ |
335 | if ((r = huft_build(c, nl, 257, cplens, cplext, tl, bl, z)) != Z_OK) | 336 | r = huft_build(c, nl, 257, cplens, cplext, tl, bl, z); |
337 | if (r != Z_OK || *bl == 0) | ||
336 | { | 338 | { |
337 | if (r == Z_DATA_ERROR) | 339 | if (r == Z_DATA_ERROR) |
338 | z->msg = (char*)"oversubscribed literal/length tree"; | 340 | z->msg = (char*)"oversubscribed literal/length tree"; |
339 | else if (r == Z_BUF_ERROR) | 341 | else if (r != Z_MEM_ERROR) |
340 | { | 342 | { |
341 | inflate_trees_free(*tl, z); | 343 | inflate_trees_free(*tl, z); |
342 | z->msg = (char*)"incomplete literal/length tree"; | 344 | z->msg = (char*)"incomplete literal/length tree"; |
@@ -346,17 +348,23 @@ z_streamp z; /* for zfree function */ | |||
346 | } | 348 | } |
347 | 349 | ||
348 | /* build distance tree */ | 350 | /* build distance tree */ |
349 | if ((r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, z)) != Z_OK) | 351 | r = huft_build(c + nl, nd, 0, cpdist, cpdext, td, bd, z); |
352 | if (r != Z_OK || (*bd == 0 && nl > 257)) | ||
350 | { | 353 | { |
351 | if (r == Z_DATA_ERROR) | 354 | if (r == Z_DATA_ERROR) |
352 | z->msg = (char*)"oversubscribed literal/length tree"; | 355 | z->msg = (char*)"oversubscribed distance tree"; |
353 | else if (r == Z_BUF_ERROR) { | 356 | else if (r == Z_BUF_ERROR) { |
354 | #ifdef PKZIP_BUG_WORKAROUND | 357 | #ifdef PKZIP_BUG_WORKAROUND |
355 | r = Z_OK; | 358 | r = Z_OK; |
356 | } | 359 | } |
357 | #else | 360 | #else |
358 | inflate_trees_free(*td, z); | 361 | inflate_trees_free(*td, z); |
359 | z->msg = (char*)"incomplete literal/length tree"; | 362 | z->msg = (char*)"incomplete distance tree"; |
363 | r = Z_DATA_ERROR; | ||
364 | } | ||
365 | else if (r != Z_MEM_ERROR) | ||
366 | { | ||
367 | z->msg = (char*)"empty distance tree with lengths"; | ||
360 | r = Z_DATA_ERROR; | 368 | r = Z_DATA_ERROR; |
361 | } | 369 | } |
362 | inflate_trees_free(*tl, z); | 370 | inflate_trees_free(*tl, z); |
@@ -8,7 +8,7 @@ SUBSYSTEM WINDOWS | |||
8 | 8 | ||
9 | STUB 'WINSTUB.EXE' | 9 | STUB 'WINSTUB.EXE' |
10 | 10 | ||
11 | VERSION 1.04 | 11 | VERSION 1.05 |
12 | 12 | ||
13 | CODE EXECUTE READ | 13 | CODE EXECUTE READ |
14 | 14 | ||
@@ -1,7 +1,7 @@ | |||
1 | /* zlib.h -- interface of the 'zlib' general purpose compression library | 1 | /* zlib.h -- interface of the 'zlib' general purpose compression library |
2 | version 1.0.4, Jul 24th, 1996. | 2 | version 1.0.5, Jan 3rd, 1998. |
3 | 3 | ||
4 | Copyright (C) 1995-1996 Jean-loup Gailly and Mark Adler | 4 | Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler |
5 | 5 | ||
6 | This software is provided 'as-is', without any express or implied | 6 | This software is provided 'as-is', without any express or implied |
7 | warranty. In no event will the authors be held liable for any damages | 7 | warranty. In no event will the authors be held liable for any damages |
@@ -37,7 +37,7 @@ extern "C" { | |||
37 | 37 | ||
38 | #include "zconf.h" | 38 | #include "zconf.h" |
39 | 39 | ||
40 | #define ZLIB_VERSION "1.0.4" | 40 | #define ZLIB_VERSION "1.0.5" |
41 | 41 | ||
42 | /* | 42 | /* |
43 | The 'zlib' compression library provides in-memory compression and | 43 | The 'zlib' compression library provides in-memory compression and |
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | #define IDR_VERSION1 1 | 3 | #define IDR_VERSION1 1 |
4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE | 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE |
5 | FILEVERSION 1,0,4,0 | 5 | FILEVERSION 1,0,5,0 |
6 | PRODUCTVERSION 1,0,4,0 | 6 | PRODUCTVERSION 1,0,5,0 |
7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK |
8 | FILEFLAGS 0 | 8 | FILEFLAGS 0 |
9 | FILEOS VOS_DOS_WINDOWS32 | 9 | FILEOS VOS_DOS_WINDOWS32 |
@@ -17,7 +17,7 @@ BEGIN | |||
17 | 17 | ||
18 | BEGIN | 18 | BEGIN |
19 | VALUE "FileDescription", "zlib data compression library\0" | 19 | VALUE "FileDescription", "zlib data compression library\0" |
20 | VALUE "FileVersion", "1.0.4\0" | 20 | VALUE "FileVersion", "1.0.5\0" |
21 | VALUE "InternalName", "zlib\0" | 21 | VALUE "InternalName", "zlib\0" |
22 | VALUE "OriginalFilename", "zlib.lib\0" | 22 | VALUE "OriginalFilename", "zlib.lib\0" |
23 | VALUE "ProductName", "ZLib.DLL\0" | 23 | VALUE "ProductName", "ZLib.DLL\0" |