DataFlash: zero-fill FMT packet before logging

this prevents uninitialised data appearing at the end of strings in
logs
This commit is contained in:
Andrew Tridgell 2013-12-21 13:56:54 +11:00
parent 2e9e464c4b
commit a37a6d68f3
1 changed files with 1 additions and 0 deletions

View File

@ -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;