Skip to content

Commit 894a0f1

Browse files
committed
Add string to int sanitizer.
1 parent f978951 commit 894a0f1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-078/WordexpTainted.ql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class WordexpTaintConfiguration extends TaintTracking::Configuration {
4545
not isCommandSubstitutionDisabled(fc)
4646
)
4747
}
48+
49+
override predicate isSanitizer(DataFlow::Node node) {
50+
node.asExpr().getUnspecifiedType() instanceof IntegralType
51+
}
4852
}
4953

5054
from WordexpTaintConfiguration conf, DataFlow::PathNode sourceNode, DataFlow::PathNode sinkNode

0 commit comments

Comments
 (0)