|
| 1 | +From b72bc56777fc7b4f63aabbf23217d082846397b7 Mon Sep 17 00:00:00 2001 |
| 2 | +From: kavyasree <kkaitepalli@microsoft.com> |
| 3 | +Date: Tue, 11 Mar 2025 12:26:11 +0530 |
| 4 | +Subject: [PATCH] Patch for CVE-2025-1744 |
| 5 | + |
| 6 | +Reference: https://github.com/madler/zlib/commit/1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d |
| 7 | +--- |
| 8 | + src/boost/libs/beast/test/extern/zlib-1.2.11/inflate.c | 5 +++-- |
| 9 | + .../tools/boost_install/test/iostreams/zlib-1.2.11/inflate.c | 5 +++-- |
| 10 | + 2 files changed, 6 insertions(+), 4 deletions(-) |
| 11 | + |
| 12 | +diff --git a/src/boost/libs/beast/test/extern/zlib-1.2.11/inflate.c b/src/boost/libs/beast/test/extern/zlib-1.2.11/inflate.c |
| 13 | +index ac333e8c2..a32c9bdba 100644 |
| 14 | +--- a/src/boost/libs/beast/test/extern/zlib-1.2.11/inflate.c |
| 15 | ++++ b/src/boost/libs/beast/test/extern/zlib-1.2.11/inflate.c |
| 16 | +@@ -759,8 +759,9 @@ int flush; |
| 17 | + if (copy > have) copy = have; |
| 18 | + if (copy) { |
| 19 | + if (state->head != Z_NULL && |
| 20 | +- state->head->extra != Z_NULL) { |
| 21 | +- len = state->head->extra_len - state->length; |
| 22 | ++ state->head->extra != Z_NULL && |
| 23 | ++ (len = state->head->extra_len - state->length) < |
| 24 | ++ state->head->extra_max) { |
| 25 | + zmemcpy(state->head->extra + len, next, |
| 26 | + len + copy > state->head->extra_max ? |
| 27 | + state->head->extra_max - len : copy); |
| 28 | +diff --git a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.c b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.c |
| 29 | +index ac333e8c2..91b2e6445 100644 |
| 30 | +--- a/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.c |
| 31 | ++++ b/src/boost/tools/boost_install/test/iostreams/zlib-1.2.11/inflate.c |
| 32 | +@@ -759,8 +759,9 @@ int flush; |
| 33 | + if (copy > have) copy = have; |
| 34 | + if (copy) { |
| 35 | + if (state->head != Z_NULL && |
| 36 | +- state->head->extra != Z_NULL) { |
| 37 | +- len = state->head->extra_len - state->length; |
| 38 | ++ state->head->extra != Z_NULL && |
| 39 | ++ (len = state->head->extra_len - state->length) < |
| 40 | ++ state->head->extra_max) { |
| 41 | + zmemcpy(state->head->extra + len, next, |
| 42 | + len + copy > state->head->extra_max ? |
| 43 | + state->head->extra_max - len : copy); |
| 44 | +-- |
| 45 | +2.34.1 |
| 46 | + |
0 commit comments