1 #include <cstddef> 2 #include <cstdint> 3 #include <unistd.h> 4 5 #include <opencv2/opencv.hpp> 6 #include "fuzzer_temp_file.h" 7 LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)8extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { 9 const FuzzerTemporaryFile file(data, size); 10 try { 11 cv::Mat matrix = cv::imread(file.filename()); 12 } catch (cv::Exception e) { 13 // Do nothing. 14 } 15 return 0; 16 } 17 18