From 2312716f8c2a16f8a2d26db475db16cde18560b4 Mon Sep 17 00:00:00 2001 From: Ashish Sharma Date: Tue, 25 Aug 2026 13:58:16 +0800 Subject: [PATCH] fix(esp_http_client): return an error when append_string realloc fails --- components/esp_http_client/lib/http_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_http_client/lib/http_utils.c b/components/esp_http_client/lib/http_utils.c index e78f09edc36..c2b6409629e 100644 --- a/components/esp_http_client/lib/http_utils.c +++ b/components/esp_http_client/lib/http_utils.c @@ -69,7 +69,7 @@ char *http_utils_append_string(char **str, const char *new_str, int len) if (old_str) { old_len = strlen(old_str); old_str = realloc(old_str, old_len + l + 1); - mem_check(old_str); + ESP_RETURN_ON_FALSE(old_str, NULL, TAG, "Memory exhausted"); // Ensure the new string is null-terminated old_str[old_len + l] = 0; } else {