James Jackson-South
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
7 additions and
4 deletions
-
src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs
-
tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Images.cs
-
tests/ImageSharp.Tests/TestImages.cs
-
tests/Images/External
-
BIN
tests/Images/Input/Jpg/issues/Issue721-InvalidAPP0.jpg
|
|
|
@ -510,7 +510,8 @@ namespace SixLabors.ImageSharp.Formats.Jpeg |
|
|
|
/// <param name="remaining">The remaining bytes in the segment block.</param>
|
|
|
|
private void ProcessApplicationHeaderMarker(int remaining) |
|
|
|
{ |
|
|
|
if (remaining < 5) |
|
|
|
// We can only decode JFif identifiers.
|
|
|
|
if (remaining < JFifMarker.Length) |
|
|
|
{ |
|
|
|
// Skip the application header length
|
|
|
|
this.InputStream.Skip(remaining); |
|
|
|
|
|
|
|
@ -25,7 +25,8 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg |
|
|
|
TestImages.Jpeg.Issues.MultiHuffmanBaseline394, |
|
|
|
TestImages.Jpeg.Issues.ExifDecodeOutOfRange694, |
|
|
|
TestImages.Jpeg.Issues.InvalidEOI695, |
|
|
|
TestImages.Jpeg.Issues.ExifResizeOutOfRange696 |
|
|
|
TestImages.Jpeg.Issues.ExifResizeOutOfRange696, |
|
|
|
TestImages.Jpeg.Issues.InvalidAPP0721 |
|
|
|
}; |
|
|
|
|
|
|
|
public static string[] ProgressiveTestJpegs = |
|
|
|
@ -54,7 +55,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg |
|
|
|
TestImages.Jpeg.Issues.MissingFF00ProgressiveBedroom159 |
|
|
|
}; |
|
|
|
|
|
|
|
private static readonly Dictionary<string, float> CustomToleranceValues = |
|
|
|
private static readonly Dictionary<string, float> CustomToleranceValues = |
|
|
|
new Dictionary<string, float> |
|
|
|
{ |
|
|
|
// Baseline:
|
|
|
|
|
|
|
|
@ -155,6 +155,7 @@ namespace SixLabors.ImageSharp.Tests |
|
|
|
public const string ExifDecodeOutOfRange694 = "Jpg/issues/Issue694-Decode-Exif-OutOfRange.jpg"; |
|
|
|
public const string InvalidEOI695 = "Jpg/issues/Issue695-Invalid-EOI.jpg"; |
|
|
|
public const string ExifResizeOutOfRange696 = "Jpg/issues/Issue696-Resize-Exif-OutOfRange.jpg"; |
|
|
|
public const string InvalidAPP0721 = "Jpg/issues/Issue721-InvalidAPP0.jpg"; |
|
|
|
} |
|
|
|
|
|
|
|
public static readonly string[] All = Baseline.All.Concat(Progressive.All).ToArray(); |
|
|
|
|
|
|
|
@ -1 +1 @@ |
|
|
|
Subproject commit 7f4d2d64c6b820ca2b6827e6a8540a1013305ccf |
|
|
|
Subproject commit 5f3cbd839fbbffae615d294d1dabafdcabc64cf9 |
Width:
|
Height:
|
Size: 1.2 MiB
|