Skip to content

Commit ae622bd

Browse files
committed
C++: Use hasGlobalOrStdName.
1 parent 2f39c64 commit ae622bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cpp/ql/src/Security/CWE/CWE-319/UseOfHttp.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ class HttpStringToUrlOpenConfig extends TaintTracking::Configuration {
5454

5555
override predicate isSink(DataFlow::Node sink) {
5656
exists(FunctionCall fc |
57-
fc.getTarget().getName() = ["system", "gethostbyname"] and
57+
fc.getTarget().hasGlobalOrStdName(["system", "gethostbyname"]) and
5858
sink.asExpr() = fc.getArgument(0)
5959
or
60-
fc.getTarget().getName() = ["send", "URLDownloadToFile"] and
60+
fc.getTarget().hasGlobalOrStdName(["send", "URLDownloadToFile"]) and
6161
sink.asExpr() = fc.getArgument(1)
6262
or
63-
fc.getTarget().getName() = "curl_easy_setopt" and
63+
fc.getTarget().hasGlobalOrStdName("curl_easy_setopt") and
6464
sink.asExpr() = fc.getArgument(2)
6565
or
66-
fc.getTarget().getName() = "ShellExecute" and
66+
fc.getTarget().hasGlobalOrStdName("ShellExecute") and
6767
sink.asExpr() = fc.getArgument(3)
6868
)
6969
}

0 commit comments

Comments
 (0)