mirror of
https://github.com/github/codeql.git
synced 2026-01-30 14:52:57 +01:00
Address review comments.
This commit is contained in:
@@ -16,7 +16,7 @@ from
|
||||
ControlFlow::ConditionGuardNode cond, DataFlow::CallNode lenA
|
||||
where
|
||||
// `i` is incremented in `fs`
|
||||
fs.getPost().(IncStmt).getExpr() = i.getAReference() and
|
||||
fs.getPost().(IncStmt).getOperand() = i.getAReference() and
|
||||
// `idx` reads `a[i]`
|
||||
idx.reads(a.getANode(), i.getARead()) and
|
||||
// `lenA` is `len(a)`
|
||||
|
||||
@@ -36,7 +36,7 @@ predicate bounds(RelationalComparisonExpr test, Variable v, string direction) {
|
||||
* downward.
|
||||
*/
|
||||
predicate updates(IncDecStmt upd, Variable v, string direction) {
|
||||
upd.getExpr() = v.getAReference() and
|
||||
upd.getOperand() = v.getAReference() and
|
||||
(
|
||||
upd instanceof IncStmt and direction = "upward"
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user