提交 c901a34c 编写于 作者: M Mark Adler

Avoid uninitialized access by gzclose_w().

上级 51a223de
......@@ -676,7 +676,7 @@ int ZEXPORT deflate (strm, flush)
s = strm->state;
if (strm->next_out == Z_NULL ||
(strm->next_in == Z_NULL && strm->avail_in != 0) ||
(strm->avail_in != 0 && strm->next_in == Z_NULL) ||
(s->status == FINISH_STATE && flush != Z_FINISH)) {
ERR_RETURN(strm, Z_STREAM_ERROR);
}
......
......@@ -47,6 +47,7 @@ local int gz_init(state)
gz_error(state, Z_MEM_ERROR, "out of memory");
return -1;
}
strm->next_in = NULL;
}
/* mark state as initialized */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册