Skip to content

Commit

Permalink
Merge pull request #1806 from kevinbackhouse/FuzzMore
Browse files Browse the repository at this point in the history
Call Metadatum::print() to increase fuzzing coverage.
  • Loading branch information
kevinbackhouse authored Sep 9, 2021
2 parents e71b99b + c710689 commit 1b53899
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fuzz/fuzz-read-print-write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t * data, size_t size) {
assert(image.get() != 0);

image->readMetadata();
for (auto& md : image->exifData()) {
md.print(&image->exifData());
}
for (auto& md : image->iptcData()) {
md.print(&image->exifData());
}
for (auto& md : image->xmpData()) {
md.print(&image->exifData());
}

// Print to a std::ostringstream so that the fuzzer doesn't
// produce lots of garbage on stdout.
Expand Down

0 comments on commit 1b53899

Please sign in to comment.