1 parent bb0c497 commit e3dc0a8Copy full SHA for e3dc0a8
1 file changed
gzwrite.c
@@ -383,7 +383,8 @@ local int gz_vacate(gz_statep state) {
383
z_streamp strm;
384
385
strm = &(state->strm);
386
- if (strm->next_in + strm->avail_in <= state->in + state->size)
+ if (strm->next_in == NULL ||
387
+ strm->next_in + strm->avail_in <= state->in + state->size)
388
return 0;
389
(void)gz_comp(state, Z_NO_FLUSH);
390
if (strm->avail_in == 0) {
0 commit comments