diff --git a/stm-firmware/temp-profile/temp-profile-parser.c b/stm-firmware/temp-profile/temp-profile-parser.c index 28b9d7a..a87e9b2 100644 --- a/stm-firmware/temp-profile/temp-profile-parser.c +++ b/stm-firmware/temp-profile/temp-profile-parser.c @@ -141,6 +141,10 @@ static int parse_line(char *line, struct pl_command *cmd) switch (token_idx) { case 0: map = string_to_command(token); + if (!map) { + /* No valid command found */ + return -1; + } c.cmd = map->command; break; default: