]> git.lizzy.rs Git - zlib.git/blobdiff - inflate.h
Do a more thorough check of the state for every stream call.
[zlib.git] / inflate.h
index ed434e5e88da5ce6b106ea0218ce763ddd0469bb..047124d30ca4a94aea54e3d5606a9e164cc5dd74 100644 (file)
--- a/inflate.h
+++ b/inflate.h
@@ -18,7 +18,7 @@
 
 /* Possible inflate modes between inflate() calls */
 typedef enum {
-    HEAD,       /* i: waiting for magic header */
+    HEAD = 16180,   /* i: waiting for magic header */
     FLAGS,      /* i: waiting for method and flags (gzip) */
     TIME,       /* i: waiting for modification time (gzip) */
     OS,         /* i: waiting for extra flags and operating system (gzip) */
@@ -80,6 +80,7 @@ typedef enum {
 /* State maintained between inflate() calls -- approximately 7K bytes, not
    including the allocated sliding window, which is up to 32K bytes. */
 struct inflate_state {
+    z_streamp strm;             /* pointer back to this zlib stream */
     inflate_mode mode;          /* current inflate mode */
     int last;                   /* true if processing last block */
     int wrap;                   /* bit 0 true for zlib, bit 1 true for gzip,