diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2023-05-02 10:09:27 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2023-05-02 10:09:27 +0200 |
commit | edd0b03e60f4cc666fbdf16e7b01b97188f2f887 (patch) | |
tree | 1124df96972d5aea4a232d83680a8eaea50ed9df /zlib/inflate.c | |
parent | ddcc9d2281de9fa68525a6808e9181bbd6bf98e0 (diff) | |
parent | 55a53949beac6e212b1232d3628d96b9b8121a49 (diff) | |
download | mariadb-git-edd0b03e60f4cc666fbdf16e7b01b97188f2f887.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'zlib/inflate.c')
-rw-r--r-- | zlib/inflate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/zlib/inflate.c b/zlib/inflate.c index 7be8c63662a..8acbef44e99 100644 --- a/zlib/inflate.c +++ b/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); |