From 9c0844da3f01fc55644bf147147b01d842d2f893 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 5 Nov 2019 09:44:06 +0100 Subject: [PATCH] http_client: possible buffer overflow fixed when determining last header item to be written closes IDF-694 --- components/esp_http_client/lib/http_header.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/esp_http_client/lib/http_header.c b/components/esp_http_client/lib/http_header.c index 65d7aa0ded..83650c935e 100644 --- a/components/esp_http_client/lib/http_header.c +++ b/components/esp_http_client/lib/http_header.c @@ -188,6 +188,7 @@ int http_header_generate_string(http_header_handle_t header, int index, char *bu if (siz + 1 > *buffer_len - 2) { ret_idx = idx - 1; + break; } }