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