diff options
-rw-r--r-- | deflate.c | 2 | ||||
-rw-r--r-- | gzwrite.c | 1 |
2 files changed, 2 insertions, 1 deletions
@@ -676,7 +676,7 @@ int ZEXPORT deflate (strm, flush) | |||
676 | s = strm->state; | 676 | s = strm->state; |
677 | 677 | ||
678 | if (strm->next_out == Z_NULL || | 678 | if (strm->next_out == Z_NULL || |
679 | (strm->next_in == Z_NULL && strm->avail_in != 0) || | 679 | (strm->avail_in != 0 && strm->next_in == Z_NULL) || |
680 | (s->status == FINISH_STATE && flush != Z_FINISH)) { | 680 | (s->status == FINISH_STATE && flush != Z_FINISH)) { |
681 | ERR_RETURN(strm, Z_STREAM_ERROR); | 681 | ERR_RETURN(strm, Z_STREAM_ERROR); |
682 | } | 682 | } |
@@ -47,6 +47,7 @@ local int gz_init(state) | |||
47 | gz_error(state, Z_MEM_ERROR, "out of memory"); | 47 | gz_error(state, Z_MEM_ERROR, "out of memory"); |
48 | return -1; | 48 | return -1; |
49 | } | 49 | } |
50 | strm->next_in = NULL; | ||
50 | } | 51 | } |
51 | 52 | ||
52 | /* mark state as initialized */ | 53 | /* mark state as initialized */ |