Commit 39836f12 authored by atanisoft's avatar atanisoft Committed by Me No Dev

correct bounds checking in Print::printf to avoid corner case of len=64 (#2204)

parent 25fd2d0f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment