Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Adopt libz/libvgz fix from FreeBSD:
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
bsdphk committed Sep 21, 2015
1 parent 2c20289 commit c440f0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libvgz/inflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
Expand Down

0 comments on commit c440f0e

Please sign in to comment.