Blame SOURCES/rsync-3.1.3-cve-2022-37434.patch

90f149
diff --git a/zlib/inflate.c b/zlib/inflate.c
90f149
index e43abd9..bd33c19 100644
90f149
--- a/zlib/inflate.c
90f149
+++ b/zlib/inflate.c
90f149
@@ -740,8 +740,9 @@ int flush;
90f149
                 if (copy > have) copy = have;
90f149
                 if (copy) {
90f149
                     if (state->head != Z_NULL &&
90f149
-                        state->head->extra != Z_NULL) {
90f149
-                        len = state->head->extra_len - state->length;
90f149
+                        state->head->extra != Z_NULL &&
90f149
+                        (len = state->head->extra_len - state->length) <
90f149
+			    state->head->extra_max) {
90f149
                         zmemcpy(state->head->extra + len, next,
90f149
                                 len + copy > state->head->extra_max ?
90f149
                                 state->head->extra_max - len : copy);