提交 39836f12 编写于 作者: A atanisoft 提交者: Me No Dev

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

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册