Skip to content

Commit

Permalink
parser yang BUGFIX avoid accessing memory after input buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Jul 15, 2024
1 parent e55443f commit f1918e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/parser_yang.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,8 @@ get_keyword(struct lysp_yang_ctx *ctx, enum ly_stmt *kw, char **word_p, size_t *
/* fall through */
default:
MOVE_INPUT(ctx, 1);
/* fall through */
case '\0':
LOGVAL_PARSER(ctx, LY_VCODE_INSTREXP, (int)(ctx->in->current - word_start), word_start,
"a keyword followed by a separator");
return LY_EVALID;
Expand Down

0 comments on commit f1918e1

Please sign in to comment.