From 3dc3f2b3b2d0a42de12aa1fcfaf261a4d2c242b0 Mon Sep 17 00:00:00 2001 From: Felipe Andrade Allemand Borges Date: Wed, 1 Mar 2023 12:13:32 -0300 Subject: [PATCH 1/2] Fixed some issue with http_helpers while building in GCC 12.x --- Release/src/http/common/http_helpers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Release/src/http/common/http_helpers.cpp b/Release/src/http/common/http_helpers.cpp index 9ffbd20dd0..7693238895 100644 --- a/Release/src/http/common/http_helpers.cpp +++ b/Release/src/http/common/http_helpers.cpp @@ -84,11 +84,11 @@ size_t chunked_encoding::add_chunked_delimiters(_Out_writes_(buffer_size) uint8_ } else { - char buffer[9]; + char buffer[17]; #ifdef _WIN32 sprintf_s(buffer, sizeof(buffer), "%8IX", bytes_read); #else - snprintf(buffer, sizeof(buffer), "%8zX", bytes_read); + snprintf(buffer, sizeof(buffer), "%08zx", bytes_read); #endif memcpy(&data[0], buffer, 8); while (data[offset] == ' ') From ed34c71b1e9ca68af7b4e6b67d065d8b8f9131f1 Mon Sep 17 00:00:00 2001 From: Felipe Andrade Allemand Borges Date: Wed, 3 May 2023 15:56:32 -0300 Subject: [PATCH 2/2] Ajusted the buffer size of http_helpers to remove an error while compiling in GCC --- Release/src/http/common/http_helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Release/src/http/common/http_helpers.cpp b/Release/src/http/common/http_helpers.cpp index 7693238895..2faceb94bc 100644 --- a/Release/src/http/common/http_helpers.cpp +++ b/Release/src/http/common/http_helpers.cpp @@ -88,7 +88,7 @@ size_t chunked_encoding::add_chunked_delimiters(_Out_writes_(buffer_size) uint8_ #ifdef _WIN32 sprintf_s(buffer, sizeof(buffer), "%8IX", bytes_read); #else - snprintf(buffer, sizeof(buffer), "%08zx", bytes_read); + snprintf(buffer, sizeof(buffer), "%8zX", bytes_read); #endif memcpy(&data[0], buffer, 8); while (data[offset] == ' ')