[master] c83cc81fb Fix a bug in our vgz-extension which is only triggered by vtest and only after 7565cdba7d10

Poul-Henning Kamp phk at FreeBSD.org
Fri May 12 22:01:13 UTC 2023


commit c83cc81fb8d3086eb5be69d8a246457c2848c0b5
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri May 12 21:59:06 2023 +0000

    Fix a bug in our vgz-extension which is only triggered by vtest and only after 7565cdba7d10

diff --git a/lib/libvgz/deflate.c b/lib/libvgz/deflate.c
index ed9ac5190..75277afd4 100644
--- a/lib/libvgz/deflate.c
+++ b/lib/libvgz/deflate.c
@@ -1810,6 +1810,9 @@ local block_state deflate_stored(s, flush)
             s->strm->total_out += len;
         }
     } while (last == 0);
+    if (last) 
+        s->strm->stop_bit =
+           (s->strm->total_out + s->pending) * 8 + s->bi_valid;
 
     /* Update the sliding window with the last s->w_size bytes of the copied
      * data, or append all of the copied data to the existing window if less


More information about the varnish-commit mailing list