diff options
author | dim <dim@FreeBSD.org> | 2015-09-07 20:55:14 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-09-07 20:55:14 +0000 |
commit | 0d218be8319b896af187fdff7a24467d2d124845 (patch) | |
tree | fc89c48639b87389f9bc68b6ea8837399b9c5045 | |
parent | 519b1a72110a3fcabd50992789ac60e739783c6f (diff) | |
download | FreeBSD-src-0d218be8319b896af187fdff7a24467d2d124845.zip FreeBSD-src-0d218be8319b896af187fdff7a24467d2d124845.tar.gz |
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
-rw-r--r-- | lib/libz/inflate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libz/inflate.c b/lib/libz/inflate.c index 870f89b..b51a8a5 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 : |