Date: Tue, 22 Sep 2015 22:35:43 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r288136 - in stable: 10/lib/libz 9/lib/libz Message-ID: <201509222235.t8MMZhGK078842@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Tue Sep 22 22:35:42 2015 New Revision: 288136 URL: https://svnweb.freebsd.org/changeset/base/288136 Log: 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 Modified: stable/9/lib/libz/inflate.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libz/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libz/inflate.c Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/libz/inflate.c ============================================================================== --- stable/9/lib/libz/inflate.c Tue Sep 22 22:27:45 2015 (r288135) +++ stable/9/lib/libz/inflate.c Tue Sep 22 22:35:42 2015 (r288136) @@ -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 :
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509222235.t8MMZhGK078842>