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

Add fuzz target #1773

Merged
merged 9 commits into from
Jul 15, 2021
Merged

Add fuzz target #1773

merged 9 commits into from
Jul 15, 2021

Conversation

kevinbackhouse
Copy link
Collaborator

This resurrects #945 by @yevgenypats, which added a libFuzzer target. That commit doesn't seem to have been merged into the new main branch.

  • I made some modifications to the fuzz target so that it also runs printStructure and writeMetadata
  • I fixed some debug printfs that were spamming the logs
  • I added an Action so that the fuzzer will be run for a short amount of time on every PR.

yevgenypats and others added 5 commits July 9, 2021 12:32
This commit places the basics for libFuzzer integration with one
fuzzer which fuzzes the readMetadata function. The fuzzer is
located at fuzz/read-metadata.

To add more fuzzers please add them to ./fuzz directory as
described in the README.

Also a memory corruption bug is found using this fuzzer which
might lead to additional bugs after fix is pushed.
@codecov
Copy link

codecov bot commented Jul 12, 2021

Codecov Report

Merging #1773 (e157fd6) into main (c7757d7) will increase coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1773      +/-   ##
==========================================
+ Coverage   67.29%   67.37%   +0.07%     
==========================================
  Files         151      151              
  Lines       20799    20807       +8     
==========================================
+ Hits        13997    14018      +21     
+ Misses       6802     6789      -13     
Impacted Files Coverage Δ
src/iptc.cpp 76.05% <ø> (ø)
src/jpgimage.cpp 77.71% <ø> (+0.04%) ⬆️
src/tiffvisitor_int.cpp 87.51% <ø> (ø)
src/sonymn_int.cpp 88.88% <0.00%> (-0.59%) ⬇️
src/futils.cpp 87.34% <0.00%> (ø)
src/tags_int.cpp 87.20% <0.00%> (ø)
src/tags_int.hpp 90.90% <0.00%> (ø)
src/tiffimage_int.cpp 89.28% <0.00%> (ø)
src/bmffimage.cpp 81.36% <0.00%> (+0.05%) ⬆️
... and 1 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 c7757d7...e157fd6. Read the comment docs.

@kevinbackhouse
Copy link
Collaborator Author

Not sure why the new action isn't showing up in the list of checks. I expect it will be shown there once the PR is merged. So I ran it on my own fork to make sure it's working: https://github.com/kevinbackhouse/exiv2/runs/3047928525

@hassec hassec added this to the v1.00 milestone Jul 15, 2021
@hassec hassec added build enhancement feature / functionality enhancements labels Jul 15, 2021
@kevinbackhouse kevinbackhouse merged commit 0208b50 into Exiv2:main Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build enhancement feature / functionality enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants