11
2- #line 2 "seclang-scanner.cc"
2+ #line 3 "seclang-scanner.cc"
33
44#define YY_INT_ALIGNED short int
55
@@ -5128,7 +5128,7 @@ static const flex_int16_t yy_rule_linenum[546] =
51285128 1174 , 1179 , 1181 , 1182 , 1183 , 1184 , 1186 , 1187 , 1188 , 1189 ,
51295129 1191 , 1192 , 1193 , 1194 , 1196 , 1198 , 1199 , 1201 , 1202 , 1203 ,
51305130 1204 , 1206 , 1211 , 1212 , 1213 , 1217 , 1218 , 1219 , 1224 , 1226 ,
5131- 1227 , 1228 , 1247 , 1276 , 1307
5131+ 1227 , 1228 , 1247 , 1276 , 1306
51325132 } ;
51335133
51345134/* The intent behind this definition is that it'll catch
@@ -5214,15 +5214,15 @@ static std::stack<int> YY_PREVIOUS_STATE;
52145214#define BEGIN_PREVIOUS () { BEGIN (YY_PREVIOUS_STATE.top ()); YY_PREVIOUS_STATE.pop (); }
52155215
52165216// The location of the current token.
5217- #line 5217 "seclang-scanner.cc"
5217+ #line 5218 "seclang-scanner.cc"
52185218#define YY_NO_INPUT 1
52195219
52205220#line 494 "seclang-scanner.ll"
52215221 // Code run each time a pattern is matched.
52225222 # define YY_USER_ACTION driver.loc.back()->columns (yyleng);
52235223
5224- #line 5224 "seclang-scanner.cc"
52255224#line 5225 "seclang-scanner.cc"
5225+ #line 5226 "seclang-scanner.cc"
52265226
52275227#define INITIAL 0
52285228#define EXPECTING_ACTION_PREDICATE_VARIABLE 1
@@ -5544,7 +5544,7 @@ YY_DECL
55445544 // Code run each time yylex is called.
55455545 driver.loc .back ()->step ();
55465546
5547- #line 5547 "seclang-scanner.cc"
5547+ #line 5548 "seclang-scanner.cc"
55485548
55495549 while ( /* CONSTCOND*/ 1 ) /* loops until end-of-file is reached */
55505550 {
@@ -8597,9 +8597,9 @@ YY_RULE_SETUP
85978597{
85988598 std::string err;
85998599 const char *tmpStr = yytext + strlen (" include" );
8600- const char *file = tmpStr + strspn ( tmpStr, " \t " );
8601- char *f = strdup (file );
8602- std::string fi = modsecurity::utils::find_resource (f , *driver.loc .back ()->end .filename , &err);
8600+ const char *afterWhitespace = tmpStr + strspn ( tmpStr, " \t " );
8601+ std::string file (afterWhitespace+ 1 , strlen (afterWhitespace)- 2 );
8602+ std::string fi = modsecurity::utils::find_resource (file , *driver.loc .back ()->end .filename , &err);
86038603 if (fi.empty () == true ) {
86048604 BEGIN (INITIAL);
86058605 driver.error (*driver.loc .back (), " " , file + std::string (" : Not able to open file. " ) + err);
@@ -8622,13 +8622,12 @@ YY_RULE_SETUP
86228622 }
86238623 yypush_buffer_state (yy_create_buffer ( yyin, YY_BUF_SIZE ));
86248624 }
8625- free (f);
86268625}
86278626 YY_BREAK
86288627case 545 :
86298628/* rule 545 can match eol */
86308629YY_RULE_SETUP
8631- #line 1307 "seclang-scanner.ll"
8630+ #line 1306 "seclang-scanner.ll"
86328631{
86338632 HttpsClient c;
86348633 std::string key;
@@ -8667,7 +8666,7 @@ YY_RULE_SETUP
86678666 YY_BREAK
86688667case 546 :
86698668YY_RULE_SETUP
8670- #line 1344 "seclang-scanner.ll"
8669+ #line 1343 "seclang-scanner.ll"
86718670ECHO;
86728671 YY_BREAK
86738672#line 8673 "seclang-scanner.cc"
@@ -9775,7 +9774,7 @@ void yyfree (void * ptr )
97759774
97769775/* %ok-for-header */
97779776
9778- #line 1344 "seclang-scanner.ll"
9777+ #line 1343 "seclang-scanner.ll"
97799778
97809779
97819780namespace modsecurity {
0 commit comments