forked from qt-creator/qt-creator
Clang: Fix possible out of bounds access in ClangFollowSymbol
Change-Id: I80132dca9c26a54059f2c1ba872b102df8e6e0d7 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -85,10 +85,10 @@ static int includePathStartIndex(const QVector<ClangBackEnd::TokenInfoContainer>
|
||||
}
|
||||
|
||||
static int includePathEndIndex(const QVector<ClangBackEnd::TokenInfoContainer> &marks,
|
||||
int currentIndex)
|
||||
int currentIndex)
|
||||
{
|
||||
int endIndex = currentIndex + 1;
|
||||
while (isValidIncludePathToken(marks[endIndex]))
|
||||
while (endIndex < marks.size() && isValidIncludePathToken(marks[endIndex]))
|
||||
++endIndex;
|
||||
return endIndex - 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user