Update java/ql/lib/semmle/code/java/dataflow/internal/TaintTrackingUtil.qll

Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
This commit is contained in:
Tony Torralba
2021-12-09 09:51:04 +01:00
parent a3b25f0eb5
commit e2022f467c

View File

@@ -596,12 +596,13 @@ private MethodAccess callReturningSameType(Expr ref) {
}
private SrcRefType entrypointType() {
result =
pragma[only_bind_out](any(RemoteFlowSource s | s instanceof DataFlow::ExplicitParameterNode))
.getType()
.(RefType)
.getASubtype*()
.getSourceDeclaration() or
exists(RemoteFlowSource s, RefType t |
s instanceof DataFlow::ExplicitParameterNode and
t = pragma[only_bind_out](s).getType() and
not t instanceof TypeObject and
result = t.getASubtype*().getSourceDeclaration()
)
or
result = entrypointType().getAField().getType().(RefType).getSourceDeclaration()
}