Check the value of abbreviationLen
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
ParserError_InvalidSerializedSwitchKeymapAction,
|
ParserError_InvalidSerializedSwitchKeymapAction,
|
||||||
ParserError_InvalidModuleConfigurationCount,
|
ParserError_InvalidModuleConfigurationCount,
|
||||||
ParserError_InvalidKeymapCount,
|
ParserError_InvalidKeymapCount,
|
||||||
|
ParserError_InvalidAbbreviationLen,
|
||||||
} parser_error_t;
|
} parser_error_t;
|
||||||
|
|
||||||
// Functions:
|
// Functions:
|
||||||
|
|||||||
@@ -205,6 +205,9 @@ parser_error_t ParseKeymap(config_buffer_t *buffer, uint8_t keymapIdx, uint8_t k
|
|||||||
|
|
||||||
(void)name;
|
(void)name;
|
||||||
(void)description;
|
(void)description;
|
||||||
|
if (!abbreviationLen || abbreviationLen > 3) {
|
||||||
|
return ParserError_InvalidAbbreviationLen;
|
||||||
|
}
|
||||||
if (layerCount != LAYER_COUNT) {
|
if (layerCount != LAYER_COUNT) {
|
||||||
return ParserError_InvalidLayerCount;
|
return ParserError_InvalidLayerCount;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user