]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
[Issue #126] Fix implicit cast from unsigned char to int. 127/head
authorMika Lindqvist <postmaster@raasu.org>
Thu, 21 Sep 2017 17:16:20 +0000 (20:16 +0300)
committerMika Lindqvist <postmaster@raasu.org>
Thu, 21 Sep 2017 17:16:20 +0000 (20:16 +0300)
inflate.c

index 1b5a554801ec31257e289bb0fb0a4450d67d7064..04f827c3561245f4631a3108d313e8aa18a150d5 100644 (file)
--- a/inflate.c
+++ b/inflate.c
@@ -483,7 +483,7 @@ static int updatewindow(z_stream *strm, const unsigned char *end, uint32_t copy)
     do { \
         if (have == 0) goto inf_leave; \
         have--; \
-        hold += (*next++ << bits); \
+        hold += ((unsigned)(*next++) << bits); \
         bits += 8; \
     } while (0)