mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C#: Bugfix in the implicittostring. Need to handle the ReadOnlySpan params overload for string.Format.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
|
||||
import csharp
|
||||
private import semmle.code.csharp.commons.Collections
|
||||
private import semmle.code.csharp.frameworks.Format
|
||||
private import semmle.code.csharp.frameworks.System
|
||||
private import semmle.code.csharp.frameworks.system.Text
|
||||
@@ -33,7 +34,7 @@ class ImplicitToStringExpr extends Expr {
|
||||
or
|
||||
p instanceof StringFormatItemParameter and
|
||||
not p.getType() =
|
||||
any(ArrayType at |
|
||||
any(ParamsCollectionType at |
|
||||
at.getElementType() instanceof ObjectType and
|
||||
this.getType().isImplicitlyConvertibleTo(at)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user