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