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

Use Safe::add() in tiffvisitor_int.cpp #2390

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

kevinbackhouse
Copy link
Collaborator

@kevinbackhouse kevinbackhouse commented Oct 23, 2022

tiffvisitor_int.cpp has a couple of hand-coded integer overflow checks, the first of which didn't actually work correctly. This PR replaces them with Safe::add. It has caused some of the test files to produce different error messages than before, so there are a few test changes.

The diff is best viewed with whitespace changes hidden, because I added a try-catch which has changed the indentation.

@lgtm-com
Copy link

lgtm-com bot commented Oct 23, 2022

This pull request fixes 1 alert when merging 62705a6 into 9767e37 - view on LGTM.com

fixed alerts:

  • 1 for Comparison result is always the same

@codecov
Copy link

codecov bot commented Oct 23, 2022

Codecov Report

Merging #2390 (62705a6) into main (9767e37) will increase coverage by 0.03%.
The diff coverage is 75.86%.

@@            Coverage Diff             @@
##             main    #2390      +/-   ##
==========================================
+ Coverage   64.37%   64.40%   +0.03%     
==========================================
  Files         119      119              
  Lines       21090    21087       -3     
  Branches    10399    10397       -2     
==========================================
+ Hits        13577    13582       +5     
+ Misses       5363     5355       -8     
  Partials     2150     2150              
Impacted Files Coverage Δ
src/tiffvisitor_int.cpp 79.78% <75.86%> (+0.04%) ⬆️
src/tiffcomposite_int.cpp 76.02% <0.00%> (+0.20%) ⬆️
src/value.cpp 72.18% <0.00%> (+0.32%) ⬆️
src/exif.cpp 66.34% <0.00%> (+0.64%) ⬆️
src/easyaccess.cpp 94.30% <0.00%> (+0.81%) ⬆️

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

Copy link
Collaborator

@kmilos kmilos left a comment

Choose a reason for hiding this comment

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

LGTM

@kevinbackhouse kevinbackhouse merged commit fb6b769 into Exiv2:main Oct 24, 2022
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.

2 participants