--- src/lib/libz/inflate.c 2004/06/30 23:54:46 1.4 +++ src/lib/libz/inflate.c 2004/08/26 19:37:06 1.5 @@ -863,6 +863,9 @@ int flush; state->lens[state->have++] = (unsigned short)len; } } + + if (state->mode == BAD) + break; /* build code tables */ state->next = state->codes; --- src/lib/libz/infback.c 2004/06/30 23:43:21 1.1 +++ src/lib/libz/infback.c 2004/08/26 19:37:06 1.2 @@ -434,6 +434,9 @@ void FAR *out_desc; } } + if (state->mode == BAD) + break; + /* build code tables */ state->next = state->codes; state->lencode = (code const FAR *)(state->next);