@@ -50,32 +50,30 @@ module Printing = ModelPrinting<ModelPrintingInput>;
50
50
/**
51
51
* Holds if `c` is a relevant content kind, where the underlying type is relevant.
52
52
*/
53
- private predicate isRelevantTypeInContent ( DataFlow:: Content c ) {
53
+ private predicate isRelevantTypeInContent ( DataFlow:: ContentSet c ) {
54
54
isRelevantType ( getUnderlyingContentType ( c ) )
55
55
}
56
56
57
57
/**
58
58
* Holds if data can flow from `node1` to `node2` either via a read or a write of an intermediate field `f`.
59
59
*/
60
60
private predicate isRelevantTaintStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
61
- exists ( DataFlow:: Content f |
61
+ exists ( DataFlow:: ContentSet f |
62
62
DataFlowPrivate:: readStep ( node1 , f , node2 ) and
63
63
// Partially restrict the content types used for intermediate steps.
64
64
( not exists ( getUnderlyingContentType ( f ) ) or isRelevantTypeInContent ( f ) )
65
65
)
66
66
or
67
- exists ( DataFlow:: Content f | DataFlowPrivate:: storeStep ( node1 , f , node2 ) |
68
- DataFlowPrivate:: containerContent ( f )
69
- )
67
+ exists ( DataFlow:: ContentSet f | DataFlowPrivate:: storeStep ( node1 , f , node2 ) | containerContent ( f ) )
70
68
}
71
69
72
70
/**
73
71
* Holds if content `c` is either a field, a synthetic field or language specific
74
72
* content of a relevant type or a container like content.
75
73
*/
76
- private predicate isRelevantContent ( DataFlow:: Content c ) {
74
+ private predicate isRelevantContent ( DataFlow:: ContentSet c ) {
77
75
isRelevantTypeInContent ( c ) or
78
- DataFlowPrivate :: containerContent ( c )
76
+ containerContent ( c )
79
77
}
80
78
81
79
/**
@@ -170,8 +168,8 @@ module PropagateFlowConfig implements DataFlow::StateConfigSig {
170
168
predicate isAdditionalFlowStep (
171
169
DataFlow:: Node node1 , FlowState state1 , DataFlow:: Node node2 , FlowState state2
172
170
) {
173
- exists ( DataFlow:: Content c |
174
- DataFlowImplCommon:: store ( node1 , c , node2 , _, _) and
171
+ exists ( DataFlow:: ContentSet c |
172
+ DataFlowImplCommon:: store ( node1 , c . getAStoreContent ( ) , node2 , _, _) and
175
173
isRelevantContent ( c ) and
176
174
(
177
175
state1 instanceof TaintRead and state2 .( TaintStore ) .getStep ( ) = 1
@@ -180,7 +178,7 @@ module PropagateFlowConfig implements DataFlow::StateConfigSig {
180
178
)
181
179
)
182
180
or
183
- exists ( DataFlow:: Content c |
181
+ exists ( DataFlow:: ContentSet c |
184
182
DataFlowPrivate:: readStep ( node1 , c , node2 ) and
185
183
isRelevantContent ( c ) and
186
184
state1 .( TaintRead ) .getStep ( ) + 1 = state2 .( TaintRead ) .getStep ( )
0 commit comments