]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Avoid a compiler error/warning about shifting a negative value.
authorWayne Davison <wayned@samba.org>
Mon, 26 Mar 2018 02:07:22 +0000 (19:07 -0700)
committerWayne Davison <wayned@samba.org>
Mon, 26 Mar 2018 02:11:41 +0000 (19:11 -0700)
Fixes bug #13268.

NEWS
zlib/inflate.c

diff --git a/NEWS b/NEWS
index 4fe6d9cb5b47f34fbdef761c4ef0e921062f79c2..792df2317ac42b456519fc9560becd187be9c99b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,8 @@ Changes since 3.1.3:
 
   BUG FIXES:
 
-    - ...
+    - Fix a compiler error/warning about shifting a negative value (in the zlib
+      code).
 
   ENHANCEMENTS:
 
index a7555738734b89524a01fc1cc9fe14bfaf6dae28..cea8e7e4ed3357f8ab9312716d9a92c07145854a 100644 (file)
@@ -1525,7 +1525,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 :