summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-04-06 23:48:24 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-06 23:48:24 +0000
commit6058efdbdc186e120e7e2121c290ac4d820ffbf8 (patch)
tree8944872de2d924d3efd76266cc929c6f25199134 /testing
parent2aa01f5ccbf1464b43527c1ffa6b42bafed9ebeb (diff)
downloadpdfium-6058efdbdc186e120e7e2121c290ac4d820ffbf8.tar.xz
Add span.h from chromium base.chromium/3392
Allows indexing with better bounds-checking to occur. Some small modifications are required to deal with PDFium being intentionally held at C++11 compliance, not C++14. Use in one place as check on correctness. Change-Id: Id2875cf0a93980112bc536a93c4f9ec5306c0dac Reviewed-on: https://pdfium-review.googlesource.com/29671 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Chris Palmer <palmer@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r--testing/libfuzzer/pdf_streamparser_fuzzer.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/testing/libfuzzer/pdf_streamparser_fuzzer.cc b/testing/libfuzzer/pdf_streamparser_fuzzer.cc
index 46113d42c6..4d9a368916 100644
--- a/testing/libfuzzer/pdf_streamparser_fuzzer.cc
+++ b/testing/libfuzzer/pdf_streamparser_fuzzer.cc
@@ -7,9 +7,10 @@
#include "core/fpdfapi/page/cpdf_streamparser.h"
#include "core/fpdfapi/parser/cpdf_object.h"
+#include "third_party/base/span.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- CPDF_StreamParser parser(data, size);
+ CPDF_StreamParser parser(pdfium::make_span(data, size));
while (std::unique_ptr<CPDF_Object> pObj =
parser.ReadNextObject(true, false, 0))
continue;