-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs: madler/zlib@eff308a (patch) madler/zlib@1eb7682 (crash fix for the patch) CVE: https://nvd.nist.gov/vuln/detail/CVE-2022-37434 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-37434 https://www.cve.org/CVERecord?id=CVE-2022-37434 curl/curl#9271
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
diff --git a/inflate.c b/inflate.c | ||
index 7be8c6366..7a7289749 100644 | ||
--- a/inflate.c | ||
+++ b/inflate.c | ||
@@ -763,9 +763,10 @@ int flush; | ||
copy = state->length; | ||
if (copy > have) copy = have; | ||
if (copy) { | ||
+ len = state->head->extra_len - state->length; | ||
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_max) { | ||
zmemcpy(state->head->extra + len, next, | ||
len + copy > state->head->extra_max ? | ||
state->head->extra_max - len : copy); | ||
diff --git a/inflate.c b/inflate.c | ||
index 7a7289749..2a3c4fe98 100644 | ||
--- a/inflate.c | ||
+++ b/inflate.c | ||
@@ -763,10 +763,10 @@ int flush; | ||
copy = state->length; | ||
if (copy > have) copy = have; | ||
if (copy) { | ||
- len = state->head->extra_len - state->length; | ||
if (state->head != Z_NULL && | ||
state->head->extra != Z_NULL && | ||
- len < state->head->extra_max) { | ||
+ (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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
zlib.patch |