Commit 3abee672 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Initialize bit positions to zero during Reset



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5710 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent a4ace024
......@@ -361,6 +361,7 @@ int ZEXPORT deflateReset (strm)
}
strm->total_in = strm->total_out = 0;
strm->start_bit = strm->stop_bit = strm->last_bit = 0;
strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
strm->data_type = Z_UNKNOWN;
......
......@@ -108,6 +108,7 @@ z_streamp strm;
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
strm->total_in = strm->total_out = state->total = 0;
strm->start_bit = strm->stop_bit = strm->last_bit = 0;
strm->msg = Z_NULL;
strm->adler = 1; /* to support ill-conceived Java test suite */
state->mode = HEAD;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment