Merge pull request #2718 from SixLabors/js/check-palette-index · SixLabors/ImageSharp@4a26acb · GitHub
Skip to content

Commit 4a26acb

Browse files
Merge pull request #2718 from SixLabors/js/check-palette-index
Limit Read Palette Indices
2 parents 8e6532a + fb64b33 commit 4a26acb

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

‎src/ImageSharp/Formats/Png/PngScanlineProcessor.cs‎

Lines changed: 2 additions & 1 deletion

‎tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,4 +693,12 @@ public void Info_BadZTXT(string file)
693693
string path = Path.GetFullPath(Path.Combine(TestEnvironment.InputImagesDirectoryFullPath, file));
694694
_ = Image.Identify(path);
695695
}
696+
697+
[Theory]
698+
[InlineData(TestImages.Png.Bad.Issue2714BadPalette)]
699+
public void Decode_BadPalette(string file)
700+
{
701+
string path = Path.GetFullPath(Path.Combine(TestEnvironment.InputImagesDirectoryFullPath, file));
702+
using Image image = Image.Load(path);
703+
}
696704
}

‎tests/ImageSharp.Tests/TestImages.cs‎

Lines changed: 2 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)