diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-03-07 14:50:56 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-03-07 14:50:56 +0000 |
commit | c29861c05b08d1e9e70014688f95aec5ce5c62eb (patch) | |
tree | 7523d321dd5364cebd7d55872a91646b333490be | |
parent | 67ee1fb53e1baf25865d51cb15a4e5f5b70840eb (diff) | |
parent | 035ecd968e451cac95e59239f7461cfada365145 (diff) | |
download | angle-android13-mainline-sdkext-release.tar.gz |
Snap for 9701827 from 035ecd968e451cac95e59239f7461cfada365145 to mainline-sdkext-releaseaml_sdk_331812000aml_sdk_331811000android13-mainline-sdkext-release
Change-Id: I0167802e0e0e42d68e42d13168ee7c94d08e7065
-rw-r--r-- | third_party/zlib/contrib/optimizations/inflate.c | 5 | ||||
-rw-r--r-- | third_party/zlib/inflate.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/third_party/zlib/contrib/optimizations/inflate.c b/third_party/zlib/contrib/optimizations/inflate.c index 4841cd964c..bb223af9c5 100644 --- a/third_party/zlib/contrib/optimizations/inflate.c +++ b/third_party/zlib/contrib/optimizations/inflate.c @@ -772,8 +772,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); diff --git a/third_party/zlib/inflate.c b/third_party/zlib/inflate.c index 7543c33def..a9e2dddba4 100644 --- a/third_party/zlib/inflate.c +++ b/third_party/zlib/inflate.c @@ -761,8 +761,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); |