Home | History | Annotate | Download | only in fuzz
      1 #include <cstdint>
      2 
      3 #include <Magick++/Image.h>
      4 
      5 #include "utils.cc"
      6 
      7 namespace MagickCore
      8 {
      9   extern "C" void AttachBlob(BlobInfo *,const void *,const size_t);
     10 }
     11 
     12 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
     13   Magick::Image image;
     14   MagickCore::AttachBlob(image.image()->blob,(const void *) Data,Size);
     15 
     16   Magick::ExceptionInfo *exceptionInfo;
     17   exceptionInfo=MagickCore::AcquireExceptionInfo();
     18   (void) HuffmanDecodeImage(image.image(), exceptionInfo);
     19   (void) MagickCore::DestroyExceptionInfo(exceptionInfo);
     20   return 0;
     21 }
     22 
     23 #include "travis.cc"
     24