r5710 - trunk/varnish-cache/lib/libvgz

phk at varnish-cache.org phk at varnish-cache.org
Tue Jan 11 11:20:50 CET 2011


Author: phk
Date: 2011-01-11 11:20:48 +0100 (Tue, 11 Jan 2011)
New Revision: 5710

Modified:
   trunk/varnish-cache/lib/libvgz/deflate.c
   trunk/varnish-cache/lib/libvgz/inflate.c
Log:
Initialize bit positions to zero during Reset



Modified: trunk/varnish-cache/lib/libvgz/deflate.c
===================================================================
--- trunk/varnish-cache/lib/libvgz/deflate.c	2011-01-11 10:04:07 UTC (rev 5709)
+++ trunk/varnish-cache/lib/libvgz/deflate.c	2011-01-11 10:20:48 UTC (rev 5710)
@@ -361,6 +361,7 @@
     }
 
     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;
 

Modified: trunk/varnish-cache/lib/libvgz/inflate.c
===================================================================
--- trunk/varnish-cache/lib/libvgz/inflate.c	2011-01-11 10:04:07 UTC (rev 5709)
+++ trunk/varnish-cache/lib/libvgz/inflate.c	2011-01-11 10:20:48 UTC (rev 5710)
@@ -108,6 +108,7 @@
     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;




More information about the varnish-commit mailing list