edge_fuzzer.cc 434 B

123456789101112131415161718
  1. #include "leptfuzz.h"
  2. extern "C" int
  3. LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
  4. if(size<3) return 0;
  5. leptSetStdNullHandler();
  6. PIX *pixs_payload = pixReadMemSpix(data, size);
  7. if(pixs_payload == NULL) return 0;
  8. l_float32 l_f1;
  9. l_float32 l_f2;
  10. l_float32 l_f3;
  11. pixMeasureEdgeSmoothness(pixs_payload, 1, 1, 1, &l_f1, &l_f2, &l_f3, NULL);
  12. pixDestroy(&pixs_payload);
  13. return 0;
  14. }