[4.0] 45807c4 Adopt libz/libvgz fix from FreeBSD:
Federico G. Schwindt
fgsch at lodoss.net
Wed May 25 12:19:06 CEST 2016
commit 45807c4dcd963a44909852fc2237f1a74edb5b85
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Sep 21 11:26:20 2015 +0000
Adopt libz/libvgz fix from FreeBSD:
r287541 | dim | 2015-09-07 20:55:14 +0000 (Mon, 07 Sep 2015) | 7 lines
In libz's inflateMark(), avoid left-shifting a negative integer, which
is undefined.
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D3344
MFC after: 3 days
diff --git a/lib/libvgz/inflate.c b/lib/libvgz/inflate.c
index e3e9fce..5c1a641 100644
--- a/lib/libvgz/inflate.c
+++ b/lib/libvgz/inflate.c
@@ -1510,7 +1510,7 @@ z_streamp strm;
{
struct inflate_state FAR *state;
- if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
+ if (strm == Z_NULL || strm->state == Z_NULL) return -(1L << 16);
state = (struct inflate_state FAR *)strm->state;
return ((long)(state->back) << 16) +
(state->mode == COPY ? state->length :
More information about the varnish-commit
mailing list