08b07c
Subject: [PATCH] Fixed inflateSyncPoint() bad return value on z15
08b07c
08b07c
---
08b07c
 contrib/s390/dfltcc.h | 4 ++++
08b07c
 inflate.c             | 2 ++
08b07c
 2 files changed, 6 insertions(+)
08b07c
08b07c
diff --git a/contrib/s390/dfltcc.h b/contrib/s390/dfltcc.h
08b07c
index 574e84c..7960626 100644
08b07c
--- a/contrib/s390/dfltcc.h
08b07c
+++ b/contrib/s390/dfltcc.h
08b07c
@@ -51,5 +51,9 @@ int ZLIB_INTERNAL dfltcc_inflate_disable OF((z_streamp strm));
08b07c
     do { \
08b07c
         if (dfltcc_was_inflate_used((strm))) return -(1L << 16); \
08b07c
     } while (0)
08b07c
+#define INFLATE_SYNC_POINT_HOOK(strm) \
08b07c
+    do { \
08b07c
+        if (dfltcc_was_inflate_used((strm))) return Z_STREAM_ERROR; \
08b07c
+    } while (0)
08b07c
 
08b07c
 #endif
08b07c
\ No newline at end of file
08b07c
diff --git a/inflate.c b/inflate.c
08b07c
index f77c2ae..596034c 100644
08b07c
--- a/inflate.c
08b07c
+++ b/inflate.c
08b07c
@@ -100,6 +100,7 @@
08b07c
 #define INFLATE_NEED_CHECKSUM(strm) 1
08b07c
 #define INFLATE_NEED_UPDATEWINDOW(strm) 1
08b07c
 #define INFLATE_MARK_HOOK(strm) do {} while (0)
08b07c
+#define INFLATE_SYNC_POINT_HOOK(strm) do {} while (0)
08b07c
 #endif
08b07c
 
08b07c
 #ifdef MAKEFIXED
08b07c
@@ -1483,6 +1484,7 @@ z_streamp strm;
08b07c
     struct inflate_state FAR *state;
08b07c
 
08b07c
     if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
08b07c
+    INFLATE_SYNC_POINT_HOOK(strm);
08b07c
     state = (struct inflate_state FAR *)strm->state;
08b07c
     return state->mode == STORED && state->bits == 0;
08b07c
 }
08b07c
-- 
08b07c
2.26.0
08b07c