Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#797 throw ImageFormatException when no StartOfFrame marker is found #801

Merged

Conversation

jongleur1983
Copy link
Contributor

@jongleur1983 jongleur1983 commented Jan 4, 2019

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Fixes #797:

For jpg images where we can't find a valid SOF (start of frame) marker we now throw an ImageFormatException reporting that fact instead of a NullReferenceException.

Added the failing image from the issue for a test case.

@codecov
Copy link

codecov bot commented Jan 4, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@db0fc0d). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #801   +/-   ##
=========================================
  Coverage          ?   88.79%           
=========================================
  Files             ?     1012           
  Lines             ?    43313           
  Branches          ?     3124           
=========================================
  Hits              ?    38459           
  Misses            ?     4156           
  Partials          ?      698
Impacted Files Coverage Δ
tests/ImageSharp.Tests/TestImages.cs 100% <ø> (ø)
...arp.Tests/Formats/Jpg/JpegDecoderTests.Baseline.cs 86.66% <100%> (ø)
src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs 87.75% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db0fc0d...59d76a0. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jan 4, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@db0fc0d). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #801   +/-   ##
=========================================
  Coverage          ?   88.79%           
=========================================
  Files             ?     1012           
  Lines             ?    43313           
  Branches          ?     3124           
=========================================
  Hits              ?    38459           
  Misses            ?     4156           
  Partials          ?      698
Impacted Files Coverage Δ
tests/ImageSharp.Tests/TestImages.cs 100% <ø> (ø)
...arp.Tests/Formats/Jpg/JpegDecoderTests.Baseline.cs 86.66% <100%> (ø)
src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs 87.75% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db0fc0d...59d76a0. Read the comment docs.

Copy link
Member

@JimBobSquarePants JimBobSquarePants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@JimBobSquarePants JimBobSquarePants merged commit 441942b into SixLabors:master Jan 6, 2019
@jongleur1983 jongleur1983 deleted the 797-LoadThrowsNRE-bySharpFuzz branch November 1, 2019 20:16
antonfirsov pushed a commit to antonfirsov/ImageSharp that referenced this pull request Nov 11, 2019
…bySharpFuzz

SixLabors#797 throw ImageFormatException when no StartOfFrame marker is found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants