Skip to content

Commit

Permalink
Call Metadatum::print() to increase fuzzing coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse committed Aug 12, 2021
1 parent f8bfad1 commit c710689
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 c710689

Please sign in to comment.