We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5acd982 commit 28be3b4Copy full SHA for 28be3b4
python/ql/src/Expressions/TruncatedDivision.ql
@@ -29,10 +29,9 @@ where
29
and not lval.(NumericValue).intValue() % rval.(NumericValue).intValue() = 0
30
and not bin.getNode().getEnclosingModule().hasFromFuture("division")
31
// Filter out results wrapped in `int(...)`
32
- and not exists(CallNode c, ClassValue cls |
33
- c.getAnArg() = bin
34
- and c.getFunction().pointsTo(cls)
35
- and cls.getName() = "int"
+ and not exists(CallNode c |
+ c = ClassValue::int_().getACall()
+ and c.getAnArg() = bin
36
)
37
38
select div, "Result of division may be truncated as its $@ and $@ arguments may both be integers.",
0 commit comments