File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
csharp/ql/test/utils/model-generator Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 18
18
| Summaries;DerivedClass1Flow;false;ReturnParam1;(System.Int32,System.Int32);Argument[1];ReturnValue;taint |
19
19
| Summaries;DerivedClass2Flow;false;ReturnParam0;(System.Int32,System.Int32);Argument[0];ReturnValue;taint |
20
20
| Summaries;DerivedClass2Flow;false;ReturnParam;(System.Int32);Argument[0];ReturnValue;taint |
21
+ | Summaries;EqualsGetHashCodeNoFlow;false;Equals;(System.Int32);Argument[0];ReturnValue;taint |
21
22
| Summaries;GenericFlow<>;false;AddFieldToGenericList;(System.Collections.Generic.List<T>);Argument[Qualifier];Argument[0].Element;taint |
22
23
| Summaries;GenericFlow<>;false;AddToGenericList<>;(System.Collections.Generic.List<S>,S);Argument[1];Argument[0].Element;taint |
23
24
| Summaries;GenericFlow<>;false;ReturnFieldInGenericList;();Argument[Qualifier];ReturnValue;taint |
Original file line number Diff line number Diff line change @@ -206,4 +206,28 @@ public static explicit operator OperatorFlow(byte b)
206
206
return new OperatorFlow ( b ) ;
207
207
}
208
208
209
+ }
210
+
211
+ public class EqualsGetHashCodeNoFlow
212
+ {
213
+ public readonly bool boolTainted ;
214
+ public readonly int intTainted ;
215
+
216
+ // No flow summary as this is an override of the Equals method.
217
+ public override bool Equals ( object obj )
218
+ {
219
+ return boolTainted ;
220
+ }
221
+
222
+ // Flow summary as this is not an override of the object Equals method.
223
+ public int Equals ( int i )
224
+ {
225
+ return i ;
226
+ }
227
+
228
+ // No flow summary as this is an override of the GetHashCode method.
229
+ public override int GetHashCode ( )
230
+ {
231
+ return intTainted ;
232
+ }
209
233
}
You can’t perform that action at this time.
0 commit comments