mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
fix off-by-one
This commit is contained in:
@@ -2709,7 +2709,7 @@ public class Parser {
|
||||
m.find(this.pos);
|
||||
int next = m.end();
|
||||
return !Whitespace.lineBreakG.matcher(inputSubstring(this.pos, next)).matches()
|
||||
&& Identifiers.isIdentifierChar(this.input.codePointAt(next + 1), false);
|
||||
&& Identifiers.isIdentifierChar(this.input.codePointAt(next), false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,7 @@ nodes
|
||||
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
|
||||
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
|
||||
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
|
||||
| file://:0:0:0:0 | (Arguments) | semmle.label | (Arguments) |
|
||||
| file://:0:0:0:0 | (Parameters) | semmle.label | (Parameters) |
|
||||
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | semmle.label | [FunctionDeclStmt] functio ... } } |
|
||||
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | semmle.order | 1 |
|
||||
@@ -49,10 +50,10 @@ nodes
|
||||
| tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | semmle.label | [ExprStmt] console.log("end"); |
|
||||
| tst.js:20:13:20:15 | [Label] log | semmle.label | [Label] log |
|
||||
| tst.js:20:17:20:21 | [Literal] "end" | semmle.label | [Literal] "end" |
|
||||
| tst.js:23:1:28:1 | [FunctionDeclStmt] functio ... } } | semmle.label | [FunctionDeclStmt] functio ... } } |
|
||||
| tst.js:23:1:28:1 | [FunctionDeclStmt] functio ... } } | semmle.order | 3 |
|
||||
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | semmle.label | [FunctionDeclStmt] functio ... ing); } |
|
||||
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | semmle.order | 3 |
|
||||
| tst.js:23:10:23:18 | [VarDecl] usesUsing | semmle.label | [VarDecl] usesUsing |
|
||||
| tst.js:23:22:28:1 | [BlockStmt] { u ... } } | semmle.label | [BlockStmt] { u ... } } |
|
||||
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | semmle.label | [BlockStmt] { u ... ing); } |
|
||||
| tst.js:24:5:24:9 | [VarRef] using | semmle.label | [VarRef] using |
|
||||
| tst.js:24:5:24:16 | [CallExpr] using("foo") | semmle.label | [CallExpr] using("foo") |
|
||||
| tst.js:24:5:24:17 | [ExprStmt] using("foo"); | semmle.label | [ExprStmt] using("foo"); |
|
||||
@@ -61,6 +62,10 @@ nodes
|
||||
| tst.js:25:14:25:18 | [VarDecl] using | semmle.label | [VarDecl] using |
|
||||
| tst.js:25:20:25:22 | [SimpleParameter] foo | semmle.label | [SimpleParameter] foo |
|
||||
| tst.js:25:25:27:5 | [BlockStmt] { ... . } | semmle.label | [BlockStmt] { ... . } |
|
||||
| tst.js:28:5:28:9 | [VarRef] using | semmle.label | [VarRef] using |
|
||||
| tst.js:28:5:28:16 | [CallExpr] using(using) | semmle.label | [CallExpr] using(using) |
|
||||
| tst.js:28:5:28:17 | [ExprStmt] using(using); | semmle.label | [ExprStmt] using(using); |
|
||||
| tst.js:28:11:28:15 | [VarRef] using | semmle.label | [VarRef] using |
|
||||
edges
|
||||
| file://:0:0:0:0 | (Arguments) | tst.js:4:10:4:18 | [AssignExpr] test = 20 | semmle.label | 0 |
|
||||
| file://:0:0:0:0 | (Arguments) | tst.js:4:10:4:18 | [AssignExpr] test = 20 | semmle.order | 0 |
|
||||
@@ -68,6 +73,8 @@ edges
|
||||
| file://:0:0:0:0 | (Arguments) | tst.js:20:17:20:21 | [Literal] "end" | semmle.order | 0 |
|
||||
| file://:0:0:0:0 | (Arguments) | tst.js:24:11:24:15 | [Literal] "foo" | semmle.label | 0 |
|
||||
| file://:0:0:0:0 | (Arguments) | tst.js:24:11:24:15 | [Literal] "foo" | semmle.order | 0 |
|
||||
| file://:0:0:0:0 | (Arguments) | tst.js:28:11:28:15 | [VarRef] using | semmle.label | 0 |
|
||||
| file://:0:0:0:0 | (Arguments) | tst.js:28:11:28:15 | [VarRef] using | semmle.order | 0 |
|
||||
| file://:0:0:0:0 | (Parameters) | tst.js:25:20:25:22 | [SimpleParameter] foo | semmle.label | 0 |
|
||||
| file://:0:0:0:0 | (Parameters) | tst.js:25:20:25:22 | [SimpleParameter] foo | semmle.order | 0 |
|
||||
| tst.js:1:1:10:1 | [FunctionDeclStmt] functio ... } } | tst.js:1:10:1:10 | [VarDecl] g | semmle.label | 0 |
|
||||
@@ -154,14 +161,16 @@ edges
|
||||
| tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | tst.js:20:5:20:15 | [DotExpr] console.log | semmle.order | 0 |
|
||||
| tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | semmle.label | 1 |
|
||||
| tst.js:20:5:20:23 | [ExprStmt] console.log("end"); | tst.js:20:5:20:22 | [MethodCallExpr] console.log("end") | semmle.order | 1 |
|
||||
| tst.js:23:1:28:1 | [FunctionDeclStmt] functio ... } } | tst.js:23:10:23:18 | [VarDecl] usesUsing | semmle.label | 0 |
|
||||
| tst.js:23:1:28:1 | [FunctionDeclStmt] functio ... } } | tst.js:23:10:23:18 | [VarDecl] usesUsing | semmle.order | 0 |
|
||||
| tst.js:23:1:28:1 | [FunctionDeclStmt] functio ... } } | tst.js:23:22:28:1 | [BlockStmt] { u ... } } | semmle.label | 5 |
|
||||
| tst.js:23:1:28:1 | [FunctionDeclStmt] functio ... } } | tst.js:23:22:28:1 | [BlockStmt] { u ... } } | semmle.order | 5 |
|
||||
| tst.js:23:22:28:1 | [BlockStmt] { u ... } } | tst.js:24:5:24:17 | [ExprStmt] using("foo"); | semmle.label | 1 |
|
||||
| tst.js:23:22:28:1 | [BlockStmt] { u ... } } | tst.js:24:5:24:17 | [ExprStmt] using("foo"); | semmle.order | 1 |
|
||||
| tst.js:23:22:28:1 | [BlockStmt] { u ... } } | tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | semmle.label | 2 |
|
||||
| tst.js:23:22:28:1 | [BlockStmt] { u ... } } | tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | semmle.order | 2 |
|
||||
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | tst.js:23:10:23:18 | [VarDecl] usesUsing | semmle.label | 0 |
|
||||
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | tst.js:23:10:23:18 | [VarDecl] usesUsing | semmle.order | 0 |
|
||||
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | semmle.label | 5 |
|
||||
| tst.js:23:1:29:1 | [FunctionDeclStmt] functio ... ing); } | tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | semmle.order | 5 |
|
||||
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:24:5:24:17 | [ExprStmt] using("foo"); | semmle.label | 1 |
|
||||
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:24:5:24:17 | [ExprStmt] using("foo"); | semmle.order | 1 |
|
||||
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | semmle.label | 2 |
|
||||
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | semmle.order | 2 |
|
||||
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:28:5:28:17 | [ExprStmt] using(using); | semmle.label | 3 |
|
||||
| tst.js:23:22:29:1 | [BlockStmt] { u ... ing); } | tst.js:28:5:28:17 | [ExprStmt] using(using); | semmle.order | 3 |
|
||||
| tst.js:24:5:24:16 | [CallExpr] using("foo") | file://:0:0:0:0 | (Arguments) | semmle.label | 1 |
|
||||
| tst.js:24:5:24:16 | [CallExpr] using("foo") | file://:0:0:0:0 | (Arguments) | semmle.order | 1 |
|
||||
| tst.js:24:5:24:16 | [CallExpr] using("foo") | tst.js:24:5:24:9 | [VarRef] using | semmle.label | 0 |
|
||||
@@ -174,5 +183,11 @@ edges
|
||||
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | tst.js:25:14:25:18 | [VarDecl] using | semmle.order | 0 |
|
||||
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | tst.js:25:25:27:5 | [BlockStmt] { ... . } | semmle.label | 5 |
|
||||
| tst.js:25:5:27:5 | [FunctionDeclStmt] functio ... . } | tst.js:25:25:27:5 | [BlockStmt] { ... . } | semmle.order | 5 |
|
||||
| tst.js:28:5:28:16 | [CallExpr] using(using) | file://:0:0:0:0 | (Arguments) | semmle.label | 1 |
|
||||
| tst.js:28:5:28:16 | [CallExpr] using(using) | file://:0:0:0:0 | (Arguments) | semmle.order | 1 |
|
||||
| tst.js:28:5:28:16 | [CallExpr] using(using) | tst.js:28:5:28:9 | [VarRef] using | semmle.label | 0 |
|
||||
| tst.js:28:5:28:16 | [CallExpr] using(using) | tst.js:28:5:28:9 | [VarRef] using | semmle.order | 0 |
|
||||
| tst.js:28:5:28:17 | [ExprStmt] using(using); | tst.js:28:5:28:16 | [CallExpr] using(using) | semmle.label | 1 |
|
||||
| tst.js:28:5:28:17 | [ExprStmt] using(using); | tst.js:28:5:28:16 | [CallExpr] using(using) | semmle.order | 1 |
|
||||
graphProperties
|
||||
| semmle.graphKind | tree |
|
||||
|
||||
@@ -25,4 +25,5 @@ function usesUsing() {
|
||||
function using(foo) {
|
||||
// ...
|
||||
}
|
||||
using(using);
|
||||
}
|
||||
Reference in New Issue
Block a user