27 lines
737 B
Diff
27 lines
737 B
Diff
|
|
From d33982e6a7e976e743e6d50a6b8b9ca93f31568a Mon Sep 17 00:00:00 2001
|
||
|
|
From: root <root@localhost.localdomain>
|
||
|
|
Date: Wed, 13 Apr 2022 17:08:31 +0800
|
||
|
|
Subject: [PATCH] zlib-2
|
||
|
|
|
||
|
|
---
|
||
|
|
deflate.c | 3 ++-
|
||
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/deflate.c b/deflate.c
|
||
|
|
index 3db6d75..a4b0977 100644
|
||
|
|
--- a/deflate.c
|
||
|
|
+++ b/deflate.c
|
||
|
|
@@ -604,7 +604,8 @@ int ZEXPORT deflatePrime (strm, bits, value)
|
||
|
|
|
||
|
|
if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||
|
|
s = strm->state;
|
||
|
|
- if (s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
|
||
|
|
+ if (bits < 0 || bits > 16 ||
|
||
|
|
+ s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
|
||
|
|
return Z_BUF_ERROR;
|
||
|
|
do {
|
||
|
|
put = Buf_size - s->bi_valid;
|
||
|
|
--
|
||
|
|
2.27.0
|
||
|
|
|