fixed memory allocation for ISO8601 time record

This commit is contained in:
Bogdan Pilyugin 2025-02-18 14:21:16 +02:00
parent 915e6aa7c5
commit ea5bad2c1d

View File

@ -626,7 +626,7 @@ esp_err_t ExtendedLog(esp_log_level_t level, char *format, ...)
continue;
char time[ISO8601_TIMESTAMP_LENGTH];
GetISO8601Time(time);
char *buf = (char*) malloc(strlen(data) + RFC3339_TIMESTAMP_LENGTH + 2);
char *buf = (char*) malloc(strlen(data) + ISO8601_TIMESTAMP_LENGTH + 2);
if (buf)
{
strcpy(buf, time);