summaryrefslogtreecommitdiff
path: root/testing/libfuzzer
diff options
context:
space:
mode:
Diffstat (limited to 'testing/libfuzzer')
-rw-r--r--testing/libfuzzer/pdf_cmap_fuzzer.cc3
-rw-r--r--testing/libfuzzer/pdf_hint_table_fuzzer.cc3
-rw-r--r--testing/libfuzzer/pdf_psengine_fuzzer.cc3
3 files changed, 6 insertions, 3 deletions
diff --git a/testing/libfuzzer/pdf_cmap_fuzzer.cc b/testing/libfuzzer/pdf_cmap_fuzzer.cc
index 0f2a22dcf2..0c0ff11f36 100644
--- a/testing/libfuzzer/pdf_cmap_fuzzer.cc
+++ b/testing/libfuzzer/pdf_cmap_fuzzer.cc
@@ -6,8 +6,9 @@
#include "core/fpdfapi/font/cpdf_cmap.h"
#include "third_party/base/ptr_util.h"
+#include "third_party/base/span.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- pdfium::MakeRetain<CPDF_CMap>()->LoadEmbedded(ByteStringView(data, size));
+ pdfium::MakeRetain<CPDF_CMap>()->LoadEmbedded(pdfium::make_span(data, size));
return 0;
}
diff --git a/testing/libfuzzer/pdf_hint_table_fuzzer.cc b/testing/libfuzzer/pdf_hint_table_fuzzer.cc
index ee51e25f24..50ca5cd693 100644
--- a/testing/libfuzzer/pdf_hint_table_fuzzer.cc
+++ b/testing/libfuzzer/pdf_hint_table_fuzzer.cc
@@ -12,6 +12,7 @@
#include "core/fpdfapi/parser/cpdf_number.h"
#include "core/fxcrt/cfx_bitstream.h"
#include "third_party/base/ptr_util.h"
+#include "third_party/base/span.h"
int32_t GetData(const int32_t** data32, const uint8_t** data, size_t* size) {
const int32_t* ret = *data32;
@@ -36,7 +37,7 @@ class HintTableForFuzzing : public CPDF_HintTables {
if (size < static_cast<size_t>(shared_hint_table_offset_))
return;
- CFX_BitStream bs(data, size);
+ CFX_BitStream bs(pdfium::make_span(data, size));
if (!ReadPageHintTable(&bs))
return;
ReadSharedObjHintTable(&bs, shared_hint_table_offset_);
diff --git a/testing/libfuzzer/pdf_psengine_fuzzer.cc b/testing/libfuzzer/pdf_psengine_fuzzer.cc
index 253b43e381..d72088d4e3 100644
--- a/testing/libfuzzer/pdf_psengine_fuzzer.cc
+++ b/testing/libfuzzer/pdf_psengine_fuzzer.cc
@@ -5,10 +5,11 @@
#include <cstdint>
#include "core/fpdfapi/page/cpdf_psengine.h"
+#include "third_party/base/span.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
CPDF_PSEngine engine;
- if (engine.Parse(ByteStringView(data, size)))
+ if (engine.Parse(pdfium::make_span(data, size)))
engine.Execute();
return 0;
}