examples/esp_http_client: output_buffer isn't necessarily NUL-terminated

Closes https://github.com/espressif/esp-idf/pull/6927
Closes IDFGH-5150
This commit is contained in:
Akihiro YAMAZAKI 2021-04-23 20:02:38 +09:00 committed by bot
parent 9afd57057d
commit 24225e5c16

View File

@ -603,7 +603,7 @@ static void http_native_request(void)
ESP_LOGI(TAG, "HTTP GET Status = %d, content_length = %d",
esp_http_client_get_status_code(client),
esp_http_client_get_content_length(client));
ESP_LOG_BUFFER_HEX(TAG, output_buffer, strlen(output_buffer));
ESP_LOG_BUFFER_HEX(TAG, output_buffer, data_read);
} else {
ESP_LOGE(TAG, "Failed to read response");
}