зеркало из https://github.com/github/codeql.git
C#: Un-deprecate `PublicCallableParameterFlowSource`
This commit is contained in:
Родитель
4e2d6c0250
Коммит
c8c706a0ba
|
@ -7,8 +7,6 @@
|
|||
import csharp
|
||||
|
||||
/**
|
||||
* DEPRECATED.
|
||||
*
|
||||
* A parameter of a public callable, for example `p` in
|
||||
*
|
||||
* ```
|
||||
|
@ -17,7 +15,7 @@ import csharp
|
|||
* }
|
||||
* ```
|
||||
*/
|
||||
deprecated class PublicCallableParameterFlowSource extends DataFlow::ParameterNode {
|
||||
class PublicCallableParameterFlowSource extends DataFlow::ParameterNode {
|
||||
PublicCallableParameterFlowSource() {
|
||||
exists(Callable c, Parameter p |
|
||||
p = this.getParameter() and
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Specialized;
|
||||
|
||||
class PublicCallableParameterFlowSource
|
||||
{
|
||||
public void M1(string x, out string y, ref string z)
|
||||
{
|
||||
y = x;
|
||||
y = z;
|
||||
}
|
||||
|
||||
void M2(string x, out string y, ref string z)
|
||||
{
|
||||
y = x;
|
||||
y = z;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
| PublicCallableParameterFlowSource.cs:6:27:6:27 | x |
|
||||
| PublicCallableParameterFlowSource.cs:6:55:6:55 | z |
|
|
@ -0,0 +1,5 @@
|
|||
import semmle.code.csharp.dataflow.flowsources.PublicCallableParameter
|
||||
|
||||
from PublicCallableParameterFlowSource source
|
||||
where source.getParameter().fromSource()
|
||||
select source
|
Загрузка…
Ссылка в новой задаче