correct bounds checking in Print::printf to avoid corner case of len=64 (#2204)
This commit is contained in:
parent
25fd2d0f3b
commit
39836f12df
@ -63,7 +63,7 @@ size_t Print::printf(const char *format, ...)
|
||||
len = vsnprintf(temp, len+1, format, arg);
|
||||
write((uint8_t*)temp, len);
|
||||
va_end(arg);
|
||||
if(len > 64){
|
||||
if(len >= sizeof(loc_buf)){
|
||||
delete[] temp;
|
||||
}
|
||||
return len;
|
||||
|
Loading…
Reference in New Issue
Block a user