Fuzzers: remove redundant codec initializations
A full library init is occuring prior to invoking the fuzzer, so
there is no need to (re)populate these modules.
Change-Id: I265512520909105f08bc37deb0f1f0713c24c916
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/55511
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/testing/fuzzers/xfa_codec_fuzzer.h b/testing/fuzzers/xfa_codec_fuzzer.h
index 9a44cc9..22f1e4d 100644
--- a/testing/fuzzers/xfa_codec_fuzzer.h
+++ b/testing/fuzzers/xfa_codec_fuzzer.h
@@ -14,22 +14,6 @@
#include "third_party/base/ptr_util.h"
#include "third_party/base/span.h"
-#ifdef PDF_ENABLE_XFA_BMP
-#include "core/fxcodec/codec/ccodec_bmpmodule.h"
-#endif // PDF_ENABLE_XFA_BMP
-
-#ifdef PDF_ENABLE_XFA_GIF
-#include "core/fxcodec/codec/ccodec_gifmodule.h"
-#endif // PDF_ENABLE_XFA_GIF
-
-#ifdef PDF_ENABLE_XFA_PNG
-#include "core/fxcodec/codec/ccodec_pngmodule.h"
-#endif // PDF_ENABLE_XFA_PNG
-
-#ifdef PDF_ENABLE_XFA_TIFF
-#include "core/fxcodec/codec/ccodec_tiffmodule.h"
-#endif // PDF_ENABLE_XFA_TIFF
-
// Support up to 64 MB. This prevents trivial OOM when MSAN is on and
// time outs.
const int kXFACodecFuzzerPixelLimit = 64000000;
@@ -38,19 +22,6 @@
public:
static int Fuzz(const uint8_t* data, size_t size, FXCODEC_IMAGE_TYPE type) {
auto* mgr = CCodec_ModuleMgr::GetInstance();
-#ifdef PDF_ENABLE_XFA_BMP
- mgr->SetBmpModule(pdfium::MakeUnique<CCodec_BmpModule>());
-#endif // PDF_ENABLE_XFA_BMP
-#ifdef PDF_ENABLE_XFA_GIF
- mgr->SetGifModule(pdfium::MakeUnique<CCodec_GifModule>());
-#endif // PDF_ENABLE_XFA_GIF
-#ifdef PDF_ENABLE_XFA_PNG
- mgr->SetPngModule(pdfium::MakeUnique<CCodec_PngModule>());
-#endif // PDF_ENABLE_XFA_PNG
-#ifdef PDF_ENABLE_XFA_TIFF
- mgr->SetTiffModule(pdfium::MakeUnique<CCodec_TiffModule>());
-#endif // PDF_ENABLE_XFA_TIFF
-
std::unique_ptr<CCodec_ProgressiveDecoder> decoder =
mgr->CreateProgressiveDecoder();
auto source = pdfium::MakeRetain<CFX_ReadOnlyMemoryStream>(