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:
Eike Ziller
2021-08-09 11:22:26 +02:00
parent 400426ed9f
commit 7bae0b9d66

View File

@@ -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;