mirror of
https://github.com/github/codeql.git
synced 2026-04-19 14:04:09 +02:00
fix out of bounds string access in isUsingDecl
This commit is contained in:
@@ -2708,7 +2708,8 @@ public class Parser {
|
||||
Matcher m = Whitespace.skipWhiteSpace.matcher(this.input);
|
||||
m.find(this.pos);
|
||||
int next = m.end();
|
||||
return !Whitespace.lineBreakG.matcher(inputSubstring(this.pos, next)).matches()
|
||||
return this.input.length() > next &&
|
||||
!Whitespace.lineBreakG.matcher(inputSubstring(this.pos, next)).matches()
|
||||
&& Identifiers.isIdentifierChar(this.input.codePointAt(next), false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user