AP_Common: fixed null termination bug in ExpandingString

not all HALs zero memory on realloc
This commit is contained in:
Andrew Tridgell 2021-04-08 12:17:07 +10:00
parent 23785c00dc
commit 5a7ee5a376
1 changed files with 1 additions and 0 deletions

View File

@ -43,6 +43,7 @@ bool ExpandingString::expand(uint32_t min_extra_space_needed)
buflen = newsize;
buf = (char *)newbuf;
memset(&buf[used], 0, newsize-used);
return true;
}