IssueNo:#I5MAFM
Description:security: Fix CVE-2022-37434
Sig:SIG_ApplicaitonFramework
Feature or Bugfix:Bugfix
Binary Source:No

Signed-off-by: wanghang <wanghang26@huawei.com>
Change-Id: If307873d4eeb639f4c86ac7ca4dd2057e9522070
This commit is contained in:
wanghang
2022-08-15 11:25:44 +08:00
parent bff16564aa
commit 73d299adf0
+3 -2
View File
@@ -764,8 +764,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);