summaryrefslogtreecommitdiff
path: root/contrib/infback9/infback9.c
diff options
context:
space:
mode:
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;