Skip to content

Commit 7d24d96

Browse files
committed
C++: Optimize MissingCheckScanf/bigStep()
1 parent 02772ed commit 7d24d96

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cpp/ql/src/Critical/MissingCheckScanf.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ class ScanfOutput extends Expr {
6666
*/
6767
Access getAnAccess() {
6868
exists(Instruction dst |
69-
this.bigStep(instr) = dst and
69+
this.bigStep() = dst and
7070
dst.getAst() = result and
7171
valueNumber(dst) = valNum
7272
)
7373
}
7474

75-
private Instruction bigStep(Instruction i) {
76-
result = this.smallStep(i)
75+
private Instruction bigStep() {
76+
result = this.smallStep(instr)
7777
or
78-
exists(Instruction j | j = this.bigStep(i) | result = this.smallStep(j))
78+
exists(Instruction i | i = this.bigStep() | result = this.smallStep(i))
7979
}
8080

8181
private Instruction smallStep(Instruction i) {

0 commit comments

Comments
 (0)