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

Don't allow zero width/height in WebPImage::inject_VP8X #2348

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

kevinbackhouse
Copy link
Collaborator

@kevinbackhouse kevinbackhouse commented Sep 5, 2022

Fixes: #2270

After reading the links mentioned in the source code (1, 2), I think the +1 and -1 adjustments are correct. However, the code is assuming that width > 0 and height > 0, which my poc (see #2270) proves isn't guaranteed to be true. Therefore, I think the best solution is to error out if the width or height is zero.

@codecov
Copy link

codecov bot commented Sep 5, 2022

Codecov Report

Merging #2348 (bf151a1) into main (175e609) will increase coverage by 0.13%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #2348      +/-   ##
==========================================
+ Coverage   63.38%   63.52%   +0.13%     
==========================================
  Files         119      119              
  Lines       20621    20623       +2     
  Branches    10231    10233       +2     
==========================================
+ Hits        13071    13100      +29     
+ Misses       5420     5394      -26     
+ Partials     2130     2129       -1     
Impacted Files Coverage Δ
src/webpimage.cpp 49.44% <0.00%> (+6.29%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@kevinbackhouse kevinbackhouse merged commit d2253c9 into Exiv2:main Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question about WebPImage::inject_VP8X
2 participants