From 39836f12df01dc8b838204b82a0a49c649842d83 Mon Sep 17 00:00:00 2001 From: atanisoft Date: Sun, 16 Dec 2018 08:09:26 -0800 Subject: [PATCH] correct bounds checking in Print::printf to avoid corner case of len=64 (#2204) --- cores/esp32/Print.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp32/Print.cpp b/cores/esp32/Print.cpp index a0c7a4a8..8c295347 100644 --- a/cores/esp32/Print.cpp +++ b/cores/esp32/Print.cpp @@ -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;