diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-02 22:27:11 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-02 22:27:11 +0000 |
commit | 874bfaa7ae88f05e6bf0172bca910a550c9d1502 (patch) | |
tree | 7523d321dd5364cebd7d55872a91646b333490be | |
parent | ae3d9f64a7875520c946ed35fc11db768992678d (diff) | |
parent | 035ecd968e451cac95e59239f7461cfada365145 (diff) | |
download | angle-android13-mainline-adservices-release.tar.gz |
Snap for 9556825 from 035ecd968e451cac95e59239f7461cfada365145 to mainline-adservices-releaseaml_ads_331920180aml_ads_331814200aml_ads_331710270aml_ads_331611190android13-mainline-adservices-release
Change-Id: I39ba4c757eb8eb9184de4f31837986a64e99e29f
-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); |