Fix performance problem in fuzzer.

main
Kevin Backhouse 1 year ago committed by Rosen Penev
parent 3682a920bd
commit d239f14952

@ -21,17 +21,23 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
image->readMetadata();
for (auto& md : image->exifData()) {
if (md.tagName().substr(0, 2) != "0x") {
md.print();
md.print(&image->exifData());
}
}
for (auto& md : image->iptcData()) {
if (md.tagName().substr(0, 2) != "0x") {
md.print();
md.print(&image->exifData());
}
}
for (auto& md : image->xmpData()) {
if (md.tagName().substr(0, 2) != "0x") {
md.print();
md.print(&image->exifData());
}
}
// Print to a std::ostringstream so that the fuzzer doesn't
// produce lots of garbage on stdout.

Loading…
Cancel
Save