From 0bdb728d1b892667ae7473018285571fd790c34d Mon Sep 17 00:00:00 2001 From: dim Date: Tue, 22 Sep 2015 22:35:42 +0000 Subject: [PATCH] MFC r287541: In libz's inflateMark(), avoid left-shifting a negative integer, which is undefined. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D3344 git-svn-id: svn://svn.freebsd.org/base/stable/10@288136 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- lib/libz/inflate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libz/inflate.c b/lib/libz/inflate.c index 870f89bb4..b51a8a50a 100644 --- a/lib/libz/inflate.c +++ b/lib/libz/inflate.c @@ -1504,7 +1504,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 : -- 2.45.0