Merge pull request #653 from Ragora/bugfix-asan-tabcomplete

BugFix: Correct an invalid memory access error caused by the tab autocomplete
This commit is contained in:
Brian Roberts 2021-11-02 16:38:18 -05:00 committed by GitHub
commit 7c1574355f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -485,6 +485,13 @@ U32 tabComplete(char* inputBuffer, U32 cursorPos, U32 maxResultLength, bool forw
}
completionBaseStart = p;
completionBaseLen = cursorPos - p;
// Bail if we end up at start of string
if (p == 0)
{
return cursorPos;
}
// Is this function being invoked on an object?
if (inputBuffer[p - 1] == '.')
{