oss-fuzz/projects/imagemagick/enhance_fuzzer.cc

17 lines
330 B
C++

#include <cstdint>
#include <Magick++/Blob.h>
#include <Magick++/Image.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
const Magick::Blob blob(Data, Size);
Magick::Image image;
try {
image.read(blob);
image.enhance();
} catch (Magick::Exception &e) {
return 0;
}
return 0;
}