Fix initialziation of XFA fuzzers against CPPGC heap. Requires a non-null platform using v3 config. Bug: chromium:1119533 Change-Id: I2afe90809ca9e4c3c7713259c7e21f6e3a7b6c4e Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72990 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/testing/fuzzers/pdf_fuzzer_init_public.cc b/testing/fuzzers/pdf_fuzzer_init_public.cc index 0ced636..ad39e36 100644 --- a/testing/fuzzers/pdf_fuzzer_init_public.cc +++ b/testing/fuzzers/pdf_fuzzer_init_public.cc
@@ -69,10 +69,13 @@ #endif // PDF_ENABLE_V8 memset(&config, '\0', sizeof(config)); - config.version = 2; + config.version = 3; config.m_pUserFontPaths = nullptr; config.m_pIsolate = nullptr; config.m_v8EmbedderSlot = 0; +#ifdef PDF_ENABLE_V8 + config.m_pPlatform = platform.get(); +#endif // PDF_ENABLE_V8 FPDF_InitLibraryWithConfig(&config); memset(&unsupport_info, '\0', sizeof(unsupport_info));