mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 15:53:56 -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;
|
buflen = newsize;
|
||||||
buf = (char *)newbuf;
|
buf = (char *)newbuf;
|
||||||
|
memset(&buf[used], 0, newsize-used);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user