File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
cpp/ql/test/library-tests/dataflow/taint-tests Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,24 @@ module AstTest {
76
76
module IRTest {
77
77
private import semmle.code.cpp.ir.IR
78
78
private import semmle.code.cpp.ir.dataflow.TaintTracking
79
+ private import semmle.code.cpp.ir.dataflow.FlowSteps
80
+
81
+ /**
82
+ * Object->field flow when the object is of type
83
+ * TaintInheritingContentObject and the field is named
84
+ * flowFromObject
85
+ */
86
+ class TaintInheritingContentTest extends TaintInheritingContent , DataFlow:: FieldContent {
87
+ TaintInheritingContentTest ( ) {
88
+ exists ( Struct o , Field f |
89
+ this .getField ( ) = f and
90
+ f = o .getAField ( ) and
91
+ o .hasGlobalName ( "TaintInheritingContentObject" ) and
92
+ f .hasName ( "flowFromObject" ) and
93
+ this .getIndirectionIndex ( ) = 1
94
+ )
95
+ }
96
+ }
79
97
80
98
/** Common data flow configuration to be used by tests. */
81
99
module TestAllocationConfig implements DataFlow:: ConfigSig {
You can’t perform that action at this time.
0 commit comments