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 vector::at() rather than operator[] (backport #1735) #1741

Merged
merged 2 commits into from
Jun 27, 2021

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jun 26, 2021

This is an automatic backport of pull request #1735 done by Mergify.
Cherry-pick of f4d3adb has failed:

On branch mergify/bp/main/pr-1735
Your branch is up to date with 'origin/main'.

You are currently cherry-picking commit f4d3adbf.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   include/exiv2/value.hpp
	modified:   src/crwimage_int.cpp
	modified:   src/exif.cpp
	new file:   test/data/issue_1706_poc.exv
	new file:   tests/bugfixes/github/test_issue_1706.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/value.cpp

To fix up this pull request, you can check it out locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

* Regression test for #1706

* Use vector::at() rather than operator[].

* Print to stderr when exception is caught and EXIV2_DEBUG_MESSAGES is enabled.

* Check that it prints "Bad value" for the date.

(cherry picked from commit f4d3adb)

# Conflicts:
#	src/value.cpp
@codecov
Copy link

codecov bot commented Jun 27, 2021

Codecov Report

Merging #1741 (1e57a35) into main (fe83c73) will increase coverage by 0.01%.
The diff coverage is 72.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1741      +/-   ##
==========================================
+ Coverage   66.89%   66.90%   +0.01%     
==========================================
  Files         151      151              
  Lines       20754    20789      +35     
==========================================
+ Hits        13883    13909      +26     
- Misses       6871     6880       +9     
Impacted Files Coverage Δ
src/value.cpp 80.33% <58.33%> (+0.06%) ⬆️
include/exiv2/value.hpp 90.62% <75.00%> (ø)
src/crwimage_int.cpp 87.04% <100.00%> (ø)
src/exif.cpp 76.10% <100.00%> (+0.26%) ⬆️
src/preview.cpp 57.46% <0.00%> (-0.29%) ⬇️
samples/Jzon.cpp 33.39% <0.00%> (-0.18%) ⬇️
src/webpimage.cpp 64.97% <0.00%> (-0.17%) ⬇️
src/pgfimage.cpp 55.93% <0.00%> (-0.11%) ⬇️
src/image.cpp 72.51% <0.00%> (-0.05%) ⬇️
src/http.cpp 0.00% <0.00%> (ø)
... and 13 more

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 fe83c73...1e57a35. Read the comment docs.

Copy link
Member

@hassec hassec left a comment

Choose a reason for hiding this comment

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

Same as in #1735 plus small merge conflict fix -> Approving.

thanks again @kevinbackhouse

@hassec hassec merged commit 1d64f48 into main Jun 27, 2021
@mergify mergify bot deleted the mergify/bp/main/pr-1735 branch June 27, 2021 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants