Skip to content

Commit 48c56cf

Browse files
committed
CPP: Remove PointsTo.
1 parent 9937430 commit 48c56cf

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

cpp/ql/src/Critical/OverflowDestination.ql

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
*/
1313
import cpp
1414
import semmle.code.cpp.security.TaintTracking
15-
import semmle.code.cpp.pointsto.PointsTo
1615

1716
/**
1817
* Holds if `fc` is a call to a copy operation where the size argument contains
@@ -44,14 +43,7 @@ predicate sourceSized(FunctionCall fc, Expr src)
4443
desttype.getArraySize() = srctype.getArraySize()))
4544
}
4645

47-
class VulnerableArgument extends PointsToExpr
48-
{
49-
VulnerableArgument() { sourceSized(_, this) }
50-
override predicate interesting() { sourceSized(_, this) }
51-
}
52-
53-
from FunctionCall fc, VulnerableArgument vuln, Expr taintSource
46+
from FunctionCall fc, Expr vuln, Expr taintSource
5447
where sourceSized(fc, vuln)
55-
and tainted(taintSource, vuln.pointsTo())
56-
and vuln.confidence() > 0.01
48+
and tainted(taintSource, vuln)
5749
select fc, "To avoid overflow, this operation should be bounded by destination-buffer size, not source-buffer size."

0 commit comments

Comments
 (0)