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