diff options
author | Wendigo <84196391+wendig0x@users.noreply.github.com> | 2023-05-19 23:15:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-19 22:15:01 +0200 |
commit | 8fc866df4070e23ec0cc88a84c8ecfd456dfb30d (patch) | |
tree | 6673d7677b0a25d0d656d92febaeca6194e0b1ed /src/Common/zlib/inflate.c | |
parent | 21918e33b66f371952ebed20f3b13317e8a94831 (diff) | |
download | VeraCrypt-8fc866df4070e23ec0cc88a84c8ecfd456dfb30d.tar.gz VeraCrypt-8fc866df4070e23ec0cc88a84c8ecfd456dfb30d.zip |
update zlib to latest version 1.2.13 (#986)
Diffstat (limited to 'src/Common/zlib/inflate.c')
-rw-r--r-- | src/Common/zlib/inflate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Common/zlib/inflate.c b/src/Common/zlib/inflate.c index 7be8c636..8acbef44 100644 --- a/src/Common/zlib/inflate.c +++ b/src/Common/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); |