aboutsummaryrefslogtreecommitdiff
path: root/infback.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 /infback.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 'infback.c')
-rw-r--r--infback.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/infback.c b/infback.c
index be0b3dc..e279d8f 100644
--- a/infback.c
+++ b/infback.c
@@ -1,5 +1,5 @@
1/* infback.c -- inflate using a call-back interface 1/* infback.c -- inflate 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
@@ -438,7 +438,16 @@ void FAR *out_desc;
438 /* handle error breaks in while */ 438 /* handle error breaks in while */
439 if (state->mode == BAD) break; 439 if (state->mode == BAD) break;
440 440
441 /* build code tables */ 441 /* check for end-of-block code (better have one) */
442 if (state->lens[256] == 0) {
443 strm->msg = (char *)"invalid code -- missing end-of-block";
444 state->mode = BAD;
445 break;
446 }
447
448 /* build code tables -- note: do not change the lenbits or distbits
449 values here (9 and 6) without reading the comments in inftrees.h
450 concerning the ENOUGH constants, which depend on those values */
442 state->next = state->codes; 451 state->next = state->codes;
443 state->lencode = (code const FAR *)(state->next); 452 state->lencode = (code const FAR *)(state->next);
444 state->lenbits = 9; 453 state->lenbits = 9;