commit | 3c19b494b40ee1b82d4a4c9158bbb5fef9e7fd83 | [log] [tgz] |
---|---|---|
author | Michal Vasko <mvasko@cesnet.cz> | Mon Sep 05 08:48:10 2022 +0200 |
committer | Michal Vasko <mvasko@cesnet.cz> | Mon Sep 05 08:48:10 2022 +0200 |
tree | 1dd0aa17d72e2c1e12f4e8af4b07e9d852ff98d3 | |
parent | 4f04d762fb1ed73fed4cdfca40a6f0bbfa3308cc [diff] |
path BUGFIX missing EOF check
diff --git a/src/path.c b/src/path.c index b29d630..523a509 100644 --- a/src/path.c +++ b/src/path.c
@@ -211,7 +211,11 @@ /* '[' */ } while (!lyxp_next_token(NULL, exp, tok_idx, LYXP_TOKEN_BRACK1)); + } else if (lyxp_check_token(ctx, exp, *tok_idx, 0)) { + /* unexpected EOF */ + goto token_error; } else { + /* invalid token */ LOGVAL(ctx, LY_VCODE_XP_INTOK, lyxp_token2str(exp->tokens[*tok_idx]), exp->expr + exp->tok_pos[*tok_idx]); goto token_error; }