$NetBSD: patch-ac,v 1.3 2004/08/31 23:16:23 reed Exp $

--- inflate.c.orig	Sat Oct 25 23:15:36 2003
+++ inflate.c
@@ -861,6 +861,9 @@ int flush;
                 }
             }
 
+            if (state->mode == BAD)
+                break;
+
             /* build code tables */
             state->next = state->codes;
             state->lencode = (code const FAR *)(state->next);
