mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
14 lines
286 B
C#
14 lines
286 B
C#
using System.Runtime.Serialization.Json;
|
|
using System.IO;
|
|
using System;
|
|
|
|
class BadDataContractJsonSerializer
|
|
{
|
|
public static object Deserialize(Type type, Stream s)
|
|
{
|
|
var ds = new DataContractJsonSerializer(type);
|
|
// BAD
|
|
return ds.ReadObject(s);
|
|
}
|
|
}
|