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 1818| Summaries;DerivedClass1Flow;false;ReturnParam1;(System.Int32,System.Int32);Argument[1];ReturnValue;taint |
1919| Summaries;DerivedClass2Flow;false;ReturnParam0;(System.Int32,System.Int32);Argument[0];ReturnValue;taint |
2020| Summaries;DerivedClass2Flow;false;ReturnParam;(System.Int32);Argument[0];ReturnValue;taint |
21+ | Summaries;EqualsGetHashCodeNoFlow;false;Equals;(System.Int32);Argument[0];ReturnValue;taint |
2122| Summaries;GenericFlow<>;false;AddFieldToGenericList;(System.Collections.Generic.List<T>);Argument[Qualifier];Argument[0].Element;taint |
2223| Summaries;GenericFlow<>;false;AddToGenericList<>;(System.Collections.Generic.List<S>,S);Argument[1];Argument[0].Element;taint |
2324| 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)
206206 return new OperatorFlow ( b ) ;
207207 }
208208
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+ }
209233}
You can’t perform that action at this time.
0 commit comments