-
Notifications
You must be signed in to change notification settings - Fork 285
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
Comment out bogus code in XMPUtils.cpp #1902
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1902 +/- ##
==========================================
+ Coverage 60.87% 60.89% +0.02%
==========================================
Files 96 96
Lines 19041 19041
Branches 9726 9726
==========================================
+ Hits 11591 11595 +4
+ Misses 5138 5133 -5
- Partials 2312 2313 +1
Continue to review full report at Codecov.
|
Is this of any use? |
@postscript-dev: Thanks for the link. The Microsoft people in that thread seem confident that their implementation works as intended, so it's unlikely that a date before 1970 is going to cause anything bad to happen. You might get a weird date, but I don't think it's going to cause a crash. |
I have updated this pull request to also check for integer overflow. The assignment |
Sorry for the delay to this, I will look at it tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
As I am not as experienced as many Exiv2 contributors, it is better to ask me to review simpler changes. I will try and help where I can.
@Mergifyio backport 0.27-maintenance |
Command
|
Comment out bogus code in XMPUtils.cpp (backport #1902)
Fixes #1901.
This loop is a very weird way to make sure that
tmLocal.tm_year
isn't less than 70. According to the comment, it's a defense against bad implementations ofmktime
. I am unconvinced thatmktime
wouldn't be able to handle dates before 1970, so I think the simplest solution is to comment this code out.