mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 02:37:19 +02:00
test(log): fixed buffer overflow in log host test fixture
This commit is contained in:
@ -95,7 +95,7 @@ private:
|
||||
int print_to_buffer(const char *format, va_list args)
|
||||
{
|
||||
// Added support for multi-line log, for example ESP_LOG_BUFFER...
|
||||
int ret = vsnprintf(&print_buffer[buffer_idx], BUFFER_SIZE, format, args);
|
||||
int ret = vsnprintf(&print_buffer[buffer_idx], BUFFER_SIZE - buffer_idx, format, args);
|
||||
buffer_idx += ret;
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user