mirror of
https://github.com/Icinga/icinga2.git
synced 2025-05-28 10:20:17 +02:00
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 */
|
||||
}
|
||||
|
||||
<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 */
|
||||
[ \t\r\n] /* ignore whitespace */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user