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

Fix integer overflow in print0x0007 #1913

Merged
merged 2 commits into from
Sep 21, 2021

Conversation

kevinbackhouse
Copy link
Collaborator

Fixes #1912.

Do the calculation in double to avoid integer overflow when the number of seconds is greater than INT_MAX.

@kevinbackhouse kevinbackhouse added this to the v1.00 milestone Sep 18, 2021
@codecov
Copy link

codecov bot commented Sep 18, 2021

Codecov Report

Merging #1913 (cd4316c) into main (774e662) will increase coverage by 0.04%.
The diff coverage is 90.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1913      +/-   ##
==========================================
+ Coverage   60.87%   60.91%   +0.04%     
==========================================
  Files          96       96              
  Lines       19041    19047       +6     
  Branches     9726     9728       +2     
==========================================
+ Hits        11591    11603      +12     
+ Misses       5138     5132       -6     
  Partials     2312     2312              
Impacted Files Coverage Δ
src/tags_int.cpp 76.81% <90.90%> (+0.47%) ⬆️
src/exiv2.cpp 57.85% <0.00%> (ø)
src/futils.cpp 72.06% <0.00%> (ø)
src/properties.cpp 73.36% <0.00%> (ø)
src/pentaxmn_int.cpp 72.92% <0.00%> (+0.23%) ⬆️
src/convert.cpp 53.84% <0.00%> (+0.34%) ⬆️
src/value.cpp 73.18% <0.00%> (+0.46%) ⬆️

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 774e662...cd4316c. Read the comment docs.

src/tags_int.cpp Outdated Show resolved Hide resolved
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 be29681 into Exiv2:main Sep 21, 2021
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.

UBSAN error in print0x0007
2 participants