Check the value of abbreviationLen

This commit is contained in:
Eric Tang
2017-08-08 17:34:08 -07:00
parent 220654876a
commit 332f1d9b5a
2 changed files with 4 additions and 0 deletions

View File

@@ -205,6 +205,9 @@ parser_error_t ParseKeymap(config_buffer_t *buffer, uint8_t keymapIdx, uint8_t k
(void)name;
(void)description;
if (!abbreviationLen || abbreviationLen > 3) {
return ParserError_InvalidAbbreviationLen;
}
if (layerCount != LAYER_COUNT) {
return ParserError_InvalidLayerCount;
}