Browse Source

DataFlash: zero-fill FMT packet before logging

this prevents uninitialised data appearing at the end of strings in
logs
mission-4.1.18
Andrew Tridgell 11 years ago
parent
commit
a37a6d68f3
  1. 1
      libraries/DataFlash/LogFile.cpp

1
libraries/DataFlash/LogFile.cpp

@ -578,6 +578,7 @@ uint16_t DataFlash_Class::StartNewLog(void) @@ -578,6 +578,7 @@ uint16_t DataFlash_Class::StartNewLog(void)
*/
void DataFlash_Class::Log_Fill_Format(const struct LogStructure *s, struct log_Format &pkt)
{
memset(&pkt, 0, sizeof(pkt));
pkt.head1 = HEAD_BYTE1;
pkt.head2 = HEAD_BYTE2;
pkt.msgid = LOG_FORMAT_MSG;

Loading…
Cancel
Save