mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 15:23:57 -04:00
AP_Common: fixed null termination bug in ExpandingString
not all HALs zero memory on realloc
This commit is contained in:
parent
23785c00dc
commit
5a7ee5a376
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user