mirror of
https://github.com/github/codeql.git
synced 2025-12-22 03:36:30 +01:00
C++: Optimize MissingCheckScanf/bigStep()
This commit is contained in:
@@ -66,16 +66,16 @@ class ScanfOutput extends Expr {
|
|||||||
*/
|
*/
|
||||||
Access getAnAccess() {
|
Access getAnAccess() {
|
||||||
exists(Instruction dst |
|
exists(Instruction dst |
|
||||||
this.bigStep(instr) = dst and
|
this.bigStep() = dst and
|
||||||
dst.getAst() = result and
|
dst.getAst() = result and
|
||||||
valueNumber(dst) = valNum
|
valueNumber(dst) = valNum
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private Instruction bigStep(Instruction i) {
|
private Instruction bigStep() {
|
||||||
result = this.smallStep(i)
|
result = this.smallStep(instr)
|
||||||
or
|
or
|
||||||
exists(Instruction j | j = this.bigStep(i) | result = this.smallStep(j))
|
exists(Instruction i | i = this.bigStep() | result = this.smallStep(i))
|
||||||
}
|
}
|
||||||
|
|
||||||
private Instruction smallStep(Instruction i) {
|
private Instruction smallStep(Instruction i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user