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

Only throw for multi SOF when fully decoding. #1226

Merged
merged 2 commits into from
Jun 12, 2020
Merged

Conversation

JimBobSquarePants
Copy link
Member

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

Fix #1221

This image could be fully decoded but threw a multi-SOF frame error when decoding. There's something funky with the image as JpegSnoop struggled with it, complaining of data past the EOF marker so it's likely Identify somehow missed the marker.

Returning instead of throwing when decoding metadata only is a quick fix. This is the first issue of it's type so if it happens again we can attempt a more complicated fix.

@codecov
Copy link

codecov bot commented Jun 11, 2020

Codecov Report

Merging #1226 into master will increase coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1226   +/-   ##
=======================================
  Coverage   82.54%   82.54%           
=======================================
  Files         697      697           
  Lines       30510    30512    +2     
  Branches     3468     3469    +1     
=======================================
+ Hits        25183    25187    +4     
+ Misses       4607     4605    -2     
  Partials      720      720           
Flag Coverage Δ
#unittests 82.54% <50.00%> (+<0.01%) ⬆️
Impacted Files Coverage Δ
src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs 92.92% <50.00%> (+0.03%) ⬆️
...files/ICC/DataReader/IccDataReader.TagDataEntry.cs 88.98% <0.00%> (+0.57%) ⬆️

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 2fbb450...c163879. Read the comment docs.

@JimBobSquarePants JimBobSquarePants merged commit 0890bca into master Jun 12, 2020
@JimBobSquarePants JimBobSquarePants deleted the js/issue-1211 branch June 12, 2020 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Identify fails on image that can be loaded without error
1 participant