summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorØrjan Malde <red@foxi.me>2022-10-27 11:35:10 +0200
committerØrjan Malde <red@foxi.me>2022-10-27 11:43:11 +0200
commit34f96f1745c594d713a9882075b2a78f87a65181 (patch)
treeaea1fdafd7adfe7a327830f0f8455500e66c54aa
parent32857195b2d54907f1aedbf87faaf54a32c81593 (diff)
downloadmidipix_build-34f96f1745c594d713a9882075b2a78f87a65181.tar.bz2
midipix_build-34f96f1745c594d713a9882075b2a78f87a65181.tar.xz
patches/libz/CVE-2022-37434.patch: new patch.
Signed-off-by: Ørjan Malde <red@foxi.me>
-rw-r--r--patches/libz/CVE-2022-37434.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/patches/libz/CVE-2022-37434.patch b/patches/libz/CVE-2022-37434.patch
new file mode 100644
index 00000000..b6f5e2e3
--- /dev/null
+++ b/patches/libz/CVE-2022-37434.patch
@@ -0,0 +1,15 @@
+diff -ru libz-1.2.8.2015.12.26.orig/inflate.c libz-1.2.8.2015.12.26/inflate.c
+--- libz-1.2.8.2015.12.26.orig/inflate.c 2015-12-21 23:37:02.000000000 +0100
++++ libz-1.2.8.2015.12.26/inflate.c 2022-10-27 11:32:39.403516533 +0200
+@@ -595,8 +595,9 @@
+ if (copy > have) copy = have;
+ if (copy) {
+ if (state->head != NULL &&
+- state->head->extra != NULL) {
+- len = state->head->extra_len - state->length;
++ state->head->extra != NULL &&
++ (len = state->head->extra_max - state->length) <
++ state->head->extra_max) {
+ memcpy(state->head->extra + len, next,
+ len + copy > state->head->extra_max ?
+ state->head->extra_max - len : copy);