import from custom branch of UXP: zlib: also pick up https://github.com/madler/zlib/commit/4346a16853e19b45787ce933666026903fb8f3f8 (eb6e4fba)

This commit is contained in:
2022-04-29 23:30:02 +08:00
parent 0fea5c58c8
commit 7dbfa36c10
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -617,7 +617,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 -1
View File
@@ -586,7 +586,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;