summaryrefslogtreecommitdiff
path: root/contrib/infback9/infback9.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:26:40 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:26:40 -0700
commitf6194ef39af5864f792412460c354cc339dde7d1 (patch)
tree5ea1e6849128e9b2194c66ee3d82afa36b4ac07c /contrib/infback9/infback9.c
parent639be997883d9016baaf46017a2802b2ce1698bd (diff)
downloadzlib-f6194ef39af5864f792412460c354cc339dde7d1.tar.gz
zlib-f6194ef39af5864f792412460c354cc339dde7d1.tar.bz2
zlib-f6194ef39af5864f792412460c354cc339dde7d1.zip
zlib 1.2.3.4v1.2.3.4
Diffstat (limited to 'contrib/infback9/infback9.c')
-rw-r--r--contrib/infback9/infback9.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/contrib/infback9/infback9.c b/contrib/infback9/infback9.c
index c5547ae..7bbe90c 100644
--- a/contrib/infback9/infback9.c
+++ b/contrib/infback9/infback9.c
@@ -1,5 +1,5 @@
1/* infback9.c -- inflate deflate64 data using a call-back interface 1/* infback9.c -- inflate deflate64 data using a call-back interface
2 * Copyright (C) 1995-2006 Mark Adler 2 * Copyright (C) 1995-2008 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
@@ -433,7 +433,16 @@ void FAR *out_desc;
433 /* handle error breaks in while */ 433 /* handle error breaks in while */
434 if (mode == BAD) break; 434 if (mode == BAD) break;
435 435
436 /* build code tables */ 436 /* check for end-of-block code (better have one) */
437 if (state->lens[256] == 0) {
438 strm->msg = (char *)"invalid code -- missing end-of-block";
439 mode = BAD;
440 break;
441 }
442
443 /* build code tables -- note: do not change the lenbits or distbits
444 values here (9 and 6) without reading the comments in inftree9.h
445 concerning the ENOUGH constants, which depend on those values */
437 state->next = state->codes; 446 state->next = state->codes;
438 lencode = (code const FAR *)(state->next); 447 lencode = (code const FAR *)(state->next);
439 lenbits = 9; 448 lenbits = 9;