Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,13 @@ module RustDataFlow implements InputSig<Location> {
node1.asExpr() = access.getExpr() and
node2.asExpr() = access
)
or
exists(TryExprCfgNode try |
node1.asExpr() = try.getExpr() and
node2.asExpr() = try and
c.(VariantPositionContent).getVariantCanonicalPath(0).getExtendedCanonicalPath() =
["crate::option::Option::Some", "crate::result::Result::Ok"]
)
)
or
FlowSummaryImpl::Private::Steps::summaryReadStep(node1.(Node::FlowSummaryNode).getSummaryNode(),
Expand Down Expand Up @@ -1065,7 +1072,8 @@ private module Cached {
TSourceParameterNode(ParamBaseCfgNode p) or
TPatNode(PatCfgNode p) or
TExprPostUpdateNode(ExprCfgNode e) {
isArgumentForCall(e, _, _) or e = any(FieldExprCfgNode access).getExpr()
isArgumentForCall(e, _, _) or
e = [any(FieldExprCfgNode access).getExpr(), any(TryExprCfgNode try).getExpr()]
} or
TSsaNode(SsaImpl::DataFlowIntegration::SsaNode node) or
TFlowSummaryNode(FlowSummaryImpl::Private::SummaryNode sn)
Expand Down
Loading
Loading