diff options
| author | Bond-009 <bond.009@outlook.com> | 2021-05-05 17:20:14 +0200 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2021-05-20 22:05:00 -0400 |
| commit | 6386606a5338bc1337dfcfb5ff71267bec6c3e60 (patch) | |
| tree | cb247b0c5564aa1bd8bef206c33e3f0e96dc30d5 /tests | |
| parent | cc908210d90e761aaa9fe3405a4707383987f401 (diff) | |
Merge pull request #5987 from Bond-009/ioob
PathExtensions: Fix index out of bounds in TryReplaceSubPath
(cherry picked from commit a6ee4632ce618e60909aa4310e33d60dcdfc1aec)
Signed-off-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs b/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs index a6fe90566..44c261f95 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs @@ -33,6 +33,7 @@ namespace Jellyfin.Server.Implementations.Tests.Library [InlineData("C:\\Users\\jeff\\myfile.mkv", "C:\\Users/jeff", "/home/jeff/", "/home/jeff/myfile.mkv")] [InlineData("C:\\Users\\jeff\\myfile.mkv", "C:\\Users/jeff/", "/home/jeff/", "/home/jeff/myfile.mkv")] [InlineData("C:\\Users\\jeff\\myfile.mkv", "C:\\Users/jeff/", "/", "/myfile.mkv")] + [InlineData("/o", "/o", "/s", "/s")] // regression test for #5977 public void TryReplaceSubPath_ValidArgs_Correct(string path, string subPath, string newSubPath, string? expectedResult) { Assert.True(PathExtensions.TryReplaceSubPath(path, subPath, newSubPath, out var result)); |
