Compiling gzip 1.9 on macOS 10.13.6 using Xcode 10.1 with clang (Apple LLVM
version 10.0.0 (clang-1000.11.45.5)), I get this error after ./configure and
make:
memrchr.c:71:18: error: cast from 'const unsigned char *' to 'const longword *'
(aka 'const unsigned long *') increases required al
This should fix it:
--- a/inflate.c
+++ b/inflate.c
@@ -799,6 +799,11 @@ inflate_dynamic(void)
NEEDBITS((unsigned)bl)
j = (td = tl + ((unsigned)b & m))->b;
DUMPBITS(j)
+if (td->e == 99)/* invalid code */
+{
+ huft_free(tl);
+ return 2;
+}
j = td->v.n;