diff options
Diffstat (limited to 'testing/libfuzzer/pdf_jpx_fuzzer.cc')
-rw-r--r-- | testing/libfuzzer/pdf_jpx_fuzzer.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/testing/libfuzzer/pdf_jpx_fuzzer.cc b/testing/libfuzzer/pdf_jpx_fuzzer.cc index 92ba210be3..5ac31486f1 100644 --- a/testing/libfuzzer/pdf_jpx_fuzzer.cc +++ b/testing/libfuzzer/pdf_jpx_fuzzer.cc @@ -6,18 +6,15 @@ #include <memory> #include <vector> +#include "core/fxcodec/codec/cjpx_decoder.h" #include "core/fxcodec/codec/codec_int.h" #include "core/fxge/fx_dib.h" CCodec_JpxModule g_module; -struct DecoderDeleter { - void operator()(CJPX_Decoder* decoder) { g_module.DestroyDecoder(decoder); } -}; - extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - std::unique_ptr<CJPX_Decoder, DecoderDeleter> decoder( - g_module.CreateDecoder(data, size, nullptr)); + std::unique_ptr<CJPX_Decoder> decoder = + g_module.CreateDecoder(data, size, nullptr); if (!decoder) return 0; |