Skip to content

Commit 6418119

Browse files
committed
add bounds check
1 parent 8ceb60b commit 6418119

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/importproject.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ void ImportProject::fsParseCommand(FileSettings& fs, const std::string& command,
271271
wholeArgQuoted = true;
272272
pos++;
273273
}
274+
if (pos >= command.size())
275+
break;
274276
if (command[pos] != '/' && command[pos] != '-')
275277
continue;
276278
pos++;

0 commit comments

Comments
 (0)