commit | 4e199f5ceab2c4882fd626e310770e4e5d07f6b0 | [log] [tgz] |
---|---|---|
author | Radek Krejci <rkrejci@cesnet.cz> | Tue May 28 09:09:28 2019 +0200 |
committer | Radek Krejci <rkrejci@cesnet.cz> | Tue May 28 09:10:24 2019 +0200 |
tree | 9a57767c8a1e3b76988b24758eb934a9e4ec61c4 | |
parent | 4dd3f7793a53e42f04fa7e4e4f2f31be39bbe8c6 [diff] [blame] |
YANG parser BUGFIX check for empty statement argument where identifier expected Fixes #791
diff --git a/src/parser_yang.c b/src/parser_yang.c index 5d94c13..bf1361c 100644 --- a/src/parser_yang.c +++ b/src/parser_yang.c
@@ -564,6 +564,11 @@ } string_end: + if (arg <= Y_PREF_IDENTIF_ARG && !(*word_len)) { + /* empty identifier */ + LOGVAL_YANG(ctx, LYVE_SYNTAX_YANG, "Statement argument is required."); + return LY_EVALID; + } return LY_SUCCESS; }