forked from qt-creator/qt-creator
SilverSearcher: Fix crash in output parser
Neither parseFilePath nor parseText guarantee that index stays < outputSize. Change-Id: I087858cf6c1027fd04a7608c8ef10f4ce88348ef Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ QList<Utils::FileSearchResult> SilverSearcherOutputParser::parse()
|
||||
continue;
|
||||
}
|
||||
parseFilePath();
|
||||
while (output[index] != '\n') {
|
||||
while (index < outputSize && output[index] != '\n') {
|
||||
parseLineNumber();
|
||||
if (index >= outputSize - 1)
|
||||
break;
|
||||
|
Reference in New Issue
Block a user