diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-09 00:25:42 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-09 00:25:42 +0000 |
commit | 14d15d12e3c04319bb5161de586c0cce9abe76ae (patch) | |
tree | 7523d321dd5364cebd7d55872a91646b333490be | |
parent | 814e03dabb67e1b5d41b2113d2d34b820d4df9f4 (diff) | |
parent | b652cb7b666c224e5ffdac0ad373611654bc70fa (diff) | |
download | angle-14d15d12e3c04319bb5161de586c0cce9abe76ae.tar.gz |
Merge cherrypicks of ['googleplex-android-review.googlesource.com/20878342'] into security-aosp-tm-release.android-security-13.0.0_r9android-security-13.0.0_r8android-security-13.0.0_r7android-security-13.0.0_r6android-security-13.0.0_r5android-security-13.0.0_r4android-security-13.0.0_r18android-security-13.0.0_r17android-security-13.0.0_r16android-security-13.0.0_r15android-security-13.0.0_r14android-security-13.0.0_r13android-security-13.0.0_r12android-security-13.0.0_r11android-security-13.0.0_r10android13-security-release
Change-Id: Ica6330de4d64e213e535c220f0c4298a5351166e
-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); |