http_header.c: Add error print in http_header_generate_string if buffer size is less than required size
Closes: https://github.com/espressif/esp-idf/issues/5028
This commit is contained in:
parent
d3c301cc99
commit
471b40b0f0
1 changed files with 1 additions and 0 deletions
|
@ -191,6 +191,7 @@ int http_header_generate_string(http_header_handle_t header, int index, char *bu
|
||||||
if (siz + 1 > *buffer_len - 2) {
|
if (siz + 1 > *buffer_len - 2) {
|
||||||
// if this item would not fit to the buffer, return the index of the last fitting one
|
// if this item would not fit to the buffer, return the index of the last fitting one
|
||||||
ret_idx = idx - 1;
|
ret_idx = idx - 1;
|
||||||
|
ESP_LOGE(TAG, "Buffer length is small to fit all the headers");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue