1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00

rc-modes bugfix - prevent buffer overflow when serializing box names (#13880)

This commit is contained in:
Petr Ledvina 2024-09-10 18:15:52 +02:00 committed by GitHub
parent 1382c30601
commit aa92203215
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 40 additions and 35 deletions

View file

@ -59,14 +59,7 @@ static uint8_t activeLinkedMacArray[MAX_MODE_ACTIVATION_CONDITION_COUNT];
PG_REGISTER_ARRAY(modeActivationCondition_t, MAX_MODE_ACTIVATION_CONDITION_COUNT, modeActivationConditions, PG_MODE_ACTIVATION_PROFILE, 3);
#if defined(USE_CUSTOM_BOX_NAMES)
PG_REGISTER_WITH_RESET_TEMPLATE(modeActivationConfig_t, modeActivationConfig, PG_MODE_ACTIVATION_CONFIG, 0);
PG_RESET_TEMPLATE(modeActivationConfig_t, modeActivationConfig,
.box_user_1_name = { 0 },
.box_user_2_name = { 0 },
.box_user_3_name = { 0 },
.box_user_4_name = { 0 },
);
PG_REGISTER(modeActivationConfig_t, modeActivationConfig, PG_MODE_ACTIVATION_CONFIG, 0);
#endif
bool IS_RC_MODE_ACTIVE(boxId_e boxId)