mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
703 B
18 lines
703 B
// Copyright (c) Six Labors.
|
|
// Licensed under the Six Labors Split License.
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats;
|
|
|
|
public class InvalidImageDimensionsTests
|
|
{
|
|
[Theory]
|
|
[InlineData("Qk1GAAAAAAAAADYAAAAoAAAAAgACAAAAAAABABgAAAAAABAAAAATCwAAEwsAAAAAAAAAAAAAAAD/AP8AAAAAAP8A/wAAAA==")]
|
|
[InlineData("R0lGODdhAgIAAIEAAAD/AP8AAAAA/wAAACwAAAQAAgACAAAIBwADABAQICAAOw==")]
|
|
[InlineData("AAACAAAAAAAAAAAAAgDCsRgAAgAAAP8A/wD/AAAA//8=")]
|
|
public void Load_WithNonPositiveDimensions_ThrowsInvalidImageContentException(string encodedData)
|
|
{
|
|
byte[] data = Convert.FromBase64String(encodedData);
|
|
|
|
Assert.Throws<InvalidImageContentException>(() => Image.Load(data));
|
|
}
|
|
}
|
|
|