diff options
author | Alex Elder <elder@linaro.org> | 2021-10-08 16:04:48 -0500 |
---|---|---|
committer | Alex Elder <elder@linaro.org> | 2021-10-08 17:00:50 -0500 |
commit | 4937e552615264b12c025e117324cfacfbf977da (patch) | |
tree | 8602eae7346bc5fdbc4668c02c683b4ae0ee962e | |
parent | ed896c97dc2b3b7edcba103e02fd0f3368b56ddd (diff) |
parser: check the proper token number
In qmi_message_parse(), a check is made to ensure members defined
for a message are unique, both in name and number. But the number
that's used in the comparison is the type token number, but should
be the member number token number. Fix this bug.
Fixes: 72d1687 ("parser: disallow duplicate members")
Signed-off-by: Alex Elder <elder@linaro.org>
-rw-r--r-- | parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -492,7 +492,7 @@ static void qmi_message_parse(enum message_type message_type) if (!strcmp(qmm->name, id_tok.str)) yyerror("duplicate message member \"%s\"", qmm->name); - if (qmm->id == type_tok.num) + if (qmm->id == num_tok.num) yyerror("duplicate message member number %u", qmm->id); } |