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

coverity: remove dead code #2525

Merged
merged 3 commits into from
Feb 27, 2023
Merged

coverity: remove dead code #2525

merged 3 commits into from
Feb 27, 2023

Conversation

neheb
Copy link
Collaborator

@neheb neheb commented Feb 26, 2023

No description provided.

@ghost
Copy link

ghost commented Feb 26, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@codecov
Copy link

codecov bot commented Feb 26, 2023

Codecov Report

Merging #2525 (ce86e0c) into main (b6f07ba) will increase coverage by 0.02%.
The diff coverage is 17.24%.

❗ Current head ce86e0c differs from pull request most recent head 0d423e2. Consider uploading reports for the commit 0d423e2 to get more accurate results

@@            Coverage Diff             @@
##             main    #2525      +/-   ##
==========================================
+ Coverage   64.65%   64.67%   +0.02%     
==========================================
  Files         103      103              
  Lines       22232    22225       -7     
  Branches    10858    10859       +1     
==========================================
  Hits        14373    14373              
+ Misses       5618     5614       -4     
+ Partials     2241     2238       -3     
Impacted Files Coverage Δ
include/exiv2/matroskavideo.hpp 60.00% <ø> (ø)
include/exiv2/tags.hpp 0.00% <ø> (ø)
src/image.cpp 70.92% <ø> (-0.06%) ⬇️
src/matroskavideo.cpp 4.67% <0.00%> (+0.14%) ⬆️
src/pngchunk_int.cpp 75.26% <ø> (+0.52%) ⬆️
src/preview.cpp 47.86% <ø> (+0.20%) ⬆️
src/rafimage.cpp 21.35% <ø> (ø)
src/value.cpp 73.85% <0.00%> (ø)
src/tags.cpp 65.74% <57.14%> (-2.65%) ⬇️
src/tiffcomposite_int.cpp 77.37% <100.00%> (+0.10%) ⬆️
... and 1 more

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

piponazo
piponazo previously approved these changes Feb 26, 2023
@neheb
Copy link
Collaborator Author

neheb commented Feb 26, 2023

I'm unsure about coverity: add move operations

Look sane?

app/app_utils.cpp Outdated Show resolved Hide resolved
CID 1521171: Missing move assignment operator

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Comment on lines -523 to -525
if (newlength > std::numeric_limits<size_t>::max()) {
return {}; // Integer overflow.
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, this overflow check doesn't work. It needs to happen before the calculation of newlength! But this whole block of code could probably be replaced with strtoull or something similar.

same as getULongLong

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Found with: CID 1521533
Unsigned compared against 0 (NO_EFFECT)

Signed-off-by: Rosen Penev <rosenp@gmail.com>
@neheb neheb merged commit b9d94e6 into Exiv2:main Feb 27, 2023
@neheb neheb deleted the mf branch February 27, 2023 15:05
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.

3 participants