# HG changeset patch # User Sebastien Jodogne # Date 1758658543 -7200 # Node ID e7e47f3188b82d664ff559d2cfe1d0814c32eef8 # Parent 5ea89eb7ba8facefaadb79dbc1eae7de46356e00 fix compatibility with ansi c diff -r 5ea89eb7ba8f -r e7e47f3188b8 OrthancFramework/Resources/Patches/civetweb-1.16.patch --- a/OrthancFramework/Resources/Patches/civetweb-1.16.patch Tue Sep 23 21:11:09 2025 +0200 +++ b/OrthancFramework/Resources/Patches/civetweb-1.16.patch Tue Sep 23 22:15:43 2025 +0200 @@ -1,6 +1,6 @@ diff -urEb civetweb-1.16.orig/src/civetweb.c civetweb-1.16/src/civetweb.c --- civetweb-1.16.orig/src/civetweb.c 2025-09-23 15:37:44.946300709 +0200 -+++ civetweb-1.16/src/civetweb.c 2025-09-23 16:05:20.877342193 +0200 ++++ civetweb-1.16/src/civetweb.c 2025-09-23 22:13:44.809084369 +0200 @@ -573,7 +573,7 @@ #if (_MSC_VER < 1300) #define STRX(x) #x @@ -33,14 +33,16 @@ #else /* USE_SERVER_STATS */ -@@ -15255,12 +15255,28 @@ +@@ -15254,13 +15254,30 @@ + if (!new_path) { mg_send_http_error(conn, 500, "out or memory"); } else { ++ /* Start of patch for CVE-2025-55763: https://github.com/civetweb/civetweb/pull/1347 */ ++ size_t len, max_append; mg_get_request_link(conn, new_path, buflen - 1); - strcat(new_path, "/"); + -+ /* Start of patch for CVE-2025-55763: https://github.com/civetweb/civetweb/pull/1347 */ -+ size_t len = strlen(new_path); ++ len = strlen(new_path); + if (len + 1 < buflen) { + new_path[len] = '/'; + new_path[len + 1] = '\0'; @@ -58,7 +60,7 @@ } + + /* Append with size of space left for query string + null terminator */ -+ size_t max_append = buflen - len - 1; ++ max_append = buflen - len - 1; + strncat(new_path, ri->query_string, max_append); + } + /* End of patch */