diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-07 13:16:29 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-07 13:16:29 +0100 |
commit | ed1cfb65c7910180cd8bab4bca46acf3b1d3b1c1 (patch) | |
tree | bdc406e5e4861818ec5b4b9a36c4fa1b9850b3f6 /thirdparty/zlib/inflate.c | |
parent | 163f6f5fe87d11645e94cd49f41226ab03063e53 (diff) | |
parent | 93409b8e64a9bc3c271ab4a7489b59a43bc0d048 (diff) |
Merge pull request #69395 from DeeJayLSP/update_zlib
zlib/minizip: Update to version 1.2.13, remove zlib from freetype
Diffstat (limited to 'thirdparty/zlib/inflate.c')
-rw-r--r-- | thirdparty/zlib/inflate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/thirdparty/zlib/inflate.c b/thirdparty/zlib/inflate.c index 7be8c63662..8acbef44e9 100644 --- a/thirdparty/zlib/inflate.c +++ b/thirdparty/zlib/inflate.c @@ -168,6 +168,8 @@ int windowBits; /* extract wrap request from windowBits parameter */ if (windowBits < 0) { + if (windowBits < -15) + return Z_STREAM_ERROR; wrap = 0; windowBits = -windowBits; } @@ -764,8 +766,9 @@ int flush; if (copy > have) copy = have; if (copy) { if (state->head != Z_NULL && - state->head->extra != Z_NULL) { - len = state->head->extra_len - state->length; + state->head->extra != Z_NULL && + (len = state->head->extra_len - state->length) < + state->head->extra_max) { zmemcpy(state->head->extra + len, next, len + copy > state->head->extra_max ? state->head->extra_max - len : copy); |