]> granicus.if.org Git - icinga2/commitdiff
Config lexer: complain on EOF in heredocs, i.e. {{{abc<EOF> 7541/head
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Thu, 26 Sep 2019 11:06:22 +0000 (13:06 +0200)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Thu, 26 Sep 2019 11:10:19 +0000 (13:10 +0200)
lib/config/config_lexer.ll

index 71f1b96c7186b2c83e15427ee28cf6080befeb30..fcf60341146b03f644ba308ffb366a1cc4c05a64 100644 (file)
@@ -115,6 +115,10 @@ do {                                                       \
        BEGIN(HEREDOC);
                                }
 
+<HEREDOC><<EOF>>                       {
+       BOOST_THROW_EXCEPTION(ScriptError("End-of-file while in string literal", DebugInfoRange(yyextra->m_LocationBegin, *yylloc)));
+                               }
+
 <HEREDOC>\}\}\}                        {
        BEGIN(INITIAL);