summaryrefslogtreecommitdiff
path: root/testing/libfuzzer
diff options
context:
space:
mode:
Diffstat (limited to 'testing/libfuzzer')
-rw-r--r--testing/libfuzzer/pdf_cmap_fuzzer.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/libfuzzer/pdf_cmap_fuzzer.cc b/testing/libfuzzer/pdf_cmap_fuzzer.cc
index 1e1ade7e19..ef0f684212 100644
--- a/testing/libfuzzer/pdf_cmap_fuzzer.cc
+++ b/testing/libfuzzer/pdf_cmap_fuzzer.cc
@@ -5,9 +5,10 @@
#include <cstdint>
#include "core/fpdfapi/font/font_int.h"
+#include "third_party/base/ptr_util.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- CPDF_CMap cmap;
- cmap.LoadEmbedded(data, size);
+ auto cmap = pdfium::MakeRetain<CPDF_CMap>();
+ cmap->LoadEmbedded(data, size);
return 0;
}