mirror of https://github.com/Icinga/icinga2.git
config: Make sure we're not inside a comment when reaching the end of a config file.
Fixes #4821
This commit is contained in:
parent
3f922e5eac
commit
78fa9bca09
|
@ -183,6 +183,14 @@ static char *lb_steal(lex_buf *lb)
|
||||||
"*" /* ignore star */
|
"*" /* ignore star */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<C_COMMENT><<EOF>> {
|
||||||
|
std::ostringstream msgbuf;
|
||||||
|
msgbuf << "End-of-file while in comment: " << yytext << " " << *yylloc;
|
||||||
|
ConfigCompilerContext::GetInstance()->AddMessage(true, msgbuf.str());
|
||||||
|
yyterminate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
\/\/[^\n]* /* ignore C++-style comments */
|
\/\/[^\n]* /* ignore C++-style comments */
|
||||||
[ \t\r\n] /* ignore whitespace */
|
[ \t\r\n] /* ignore whitespace */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue