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 quadratic loops in pentaxmn_int.cpp #1910

Merged
merged 1 commit into from
Sep 19, 2021

Conversation

kevinbackhouse
Copy link
Collaborator

Fixes: #1909

I didn't add a test because the poc attached to #1909 is quite big. (You need a large file for the quadratic loop to take a noticeable amount of time to run.)

The fix is to search from the current position, rather than repeatedly searching from the beginning of the string.

@kevinbackhouse kevinbackhouse added bug OSS-Fuzz Bug reported by https://google.github.io/oss-fuzz/ labels Sep 17, 2021
@kevinbackhouse kevinbackhouse added this to the v1.00 milestone Sep 17, 2021
@codecov
Copy link

codecov bot commented Sep 17, 2021

Codecov Report

Merging #1910 (dfcc305) into main (774e662) will increase coverage by 0.00%.
The diff coverage is 50.00%.

❗ Current head dfcc305 differs from pull request most recent head 9f1e3e3. Consider uploading reports for the commit 9f1e3e3 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1910   +/-   ##
=======================================
  Coverage   60.87%   60.87%           
=======================================
  Files          96       96           
  Lines       19041    19043    +2     
  Branches     9726     9726           
=======================================
+ Hits        11591    11593    +2     
  Misses       5138     5138           
  Partials     2312     2312           
Impacted Files Coverage Δ
src/pentaxmn_int.cpp 72.92% <50.00%> (+0.23%) ⬆️

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...9f1e3e3. Read the comment docs.

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
Copy link
Collaborator Author

@Mergifyio backport 0.27-maintenance

@mergify
Copy link
Contributor

mergify bot commented Sep 24, 2021

Command backport 0.27-maintenance: success

Backports have been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug OSS-Fuzz Bug reported by https://google.github.io/oss-fuzz/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quadratic loop in PentaxMakerNote::printVersion
2 participants