DataFlash: account for snprintf now null-terminating strings

This commit is contained in:
Peter Barker 2018-09-06 12:16:49 +10:00 committed by Andrew Tridgell
parent de3244e26c
commit 4c794ebba3
2 changed files with 2 additions and 2 deletions

View File

@ -431,7 +431,7 @@ bool DataFlash_Class::logging_failed() const
void DataFlash_Class::Log_Write_MessageF(const char *fmt, ...)
{
char msg[64] {};
char msg[65] {}; // sizeof(log_Message.msg) + null-termination
va_list ap;
va_start(ap, fmt);

View File

@ -408,7 +408,7 @@ bool DataFlash_Backend::ShouldLog(bool is_critical)
bool DataFlash_Backend::Log_Write_MessageF(const char *fmt, ...)
{
char msg[64] {};
char msg[65] {}; // sizeof(log_Message.msg) + null-termination
va_list ap;
va_start(ap, fmt);