mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
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
This commit is contained in:
parent
9af8c8b72b
commit
1c292cd806
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287541
|
@ -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 :
|
||||
|
|
Loading…
Reference in a new issue