]> granicus.if.org Git - imagemagick/commitdiff
Force use of specific encoder when reading the image in the fuzz tests created by...
authorDirk Lemstra <dirk@git.imagemagick.org>
Tue, 9 Jan 2018 22:55:03 +0000 (23:55 +0100)
committerDirk Lemstra <dirk@git.imagemagick.org>
Tue, 9 Jan 2018 22:55:03 +0000 (23:55 +0100)
Magick++/fuzz/encoder_fuzzer.cc

index 1bd601ead6216e28b1a1b8c59151b28a9f8612c1..134a90d600e74376accf28f60ea882607645b7c0 100644 (file)
@@ -10,6 +10,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
   const Magick::Blob blob(Data, Size);
   Magick::Image image;
   try {
+    image.magick(FUZZ_ENCODER);
+    image.fileName(FUZZ_ENCODER + ':');
     image.read(blob);
   } catch (Magick::Exception &e) {
     return 0;