diff options
| author | Patrick Barron <barronpm@gmail.com> | 2021-06-18 18:47:44 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2021-06-18 18:56:10 -0400 |
| commit | be88efce3cbbd357142a75f109258d6c7be398b4 (patch) | |
| tree | df8a0bf9d5e108d45a473edd8121a9af91ca6a0d /fuzz/Emby.Server.Implementations.Fuzz/Program.cs | |
| parent | 336ba2879f325a4efd52bc7737ce94f40369bfeb (diff) | |
| parent | c791c3a215b33bd4ca534c9f383c9fd7d23b59af (diff) | |
Merge branch 'master' into authenticationdb-efcore
# Conflicts:
# Emby.Server.Implementations/Devices/DeviceManager.cs
# Emby.Server.Implementations/HttpServer/Security/SessionContext.cs
# Emby.Server.Implementations/Security/AuthenticationRepository.cs
# Emby.Server.Implementations/Session/SessionManager.cs
# Jellyfin.Server.Implementations/Security/AuthorizationContext.cs
# MediaBrowser.Controller/Library/IUserManager.cs
# MediaBrowser.Controller/Net/ISessionContext.cs
Diffstat (limited to 'fuzz/Emby.Server.Implementations.Fuzz/Program.cs')
| -rw-r--r-- | fuzz/Emby.Server.Implementations.Fuzz/Program.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/fuzz/Emby.Server.Implementations.Fuzz/Program.cs b/fuzz/Emby.Server.Implementations.Fuzz/Program.cs new file mode 100644 index 000000000..a4a6f5f54 --- /dev/null +++ b/fuzz/Emby.Server.Implementations.Fuzz/Program.cs @@ -0,0 +1,32 @@ +using System; +using Emby.Server.Implementations.Library; +using SharpFuzz; + +namespace Emby.Server.Implementations.Fuzz +{ + public static class Program + { + public static void Main(string[] args) + { + switch (args[0]) + { + case "PathExtensions.TryReplaceSubPath": Run(PathExtensions_TryReplaceSubPath); return; + default: throw new ArgumentException($"Unknown fuzzing function: {args[0]}"); + } + } + + private static void Run(Action<string> action) => Fuzzer.OutOfProcess.Run(action); + + private static void PathExtensions_TryReplaceSubPath(string data) + { + // Stupid, but it worked + var parts = data.Split(':'); + if (parts.Length != 3) + { + return; + } + + _ = PathExtensions.TryReplaceSubPath(parts[0], parts[1], parts[2], out _); + } + } +} |
