mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 19:40:31 +03:00
Fix MSP memory issue (#14221)
* fixes #14219 * Update src/main/msp/msp.c Co-authored-by: Petr Ledvina <ledvinap@gmail.com> --------- Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
This commit is contained in:
parent
7cc8ee9a54
commit
79ecc1ac74
1 changed files with 1 additions and 1 deletions
|
@ -4147,7 +4147,7 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP,
|
||||||
}
|
}
|
||||||
|
|
||||||
const unsigned textLength = MIN(textSpace, sbufReadU8(src));
|
const unsigned textLength = MIN(textSpace, sbufReadU8(src));
|
||||||
memset(textVar, 0, strlen(textVar));
|
textVar[textLength] = '\0';
|
||||||
sbufReadData(src, textVar, textLength);
|
sbufReadData(src, textVar, textLength);
|
||||||
|
|
||||||
#ifdef USE_OSD
|
#ifdef USE_OSD
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue