Skip to content

Commit 128172b

Browse files
committed
add bounds check
1 parent 8ceb60b commit 128172b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/importproject.cpp

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

0 commit comments

Comments
 (0)