diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-03-28 18:28:45 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-03-28 18:28:45 +0000 |
commit | e3c204392a01870ecc9e8f3b2aa06b2b45306b5a (patch) | |
tree | 07a082760b5575f58458ecba1fe14384c3160cc0 /testing/libfuzzer/pdf_cmap_fuzzer.cc | |
parent | 7aba472e80b073fb699c702a0971f31282737bb3 (diff) | |
download | pdfium-e3c204392a01870ecc9e8f3b2aa06b2b45306b5a.tar.xz |
Use ByteStringView in parsers
This CL converts the CPDF_SimpleParser to accept a ByteStringView.
Several of the callers of SimpleParser are also updated to use a
ByteStringView instead of <char*,size>.
Change-Id: Ic2df3a06f92e77b53745a0419b44368142f9d8e6
Reviewed-on: https://pdfium-review.googlesource.com/29351
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'testing/libfuzzer/pdf_cmap_fuzzer.cc')
-rw-r--r-- | testing/libfuzzer/pdf_cmap_fuzzer.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/testing/libfuzzer/pdf_cmap_fuzzer.cc b/testing/libfuzzer/pdf_cmap_fuzzer.cc index b0e41d511c..0f2a22dcf2 100644 --- a/testing/libfuzzer/pdf_cmap_fuzzer.cc +++ b/testing/libfuzzer/pdf_cmap_fuzzer.cc @@ -8,7 +8,6 @@ #include "third_party/base/ptr_util.h" extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - auto cmap = pdfium::MakeRetain<CPDF_CMap>(); - cmap->LoadEmbedded(data, size); + pdfium::MakeRetain<CPDF_CMap>()->LoadEmbedded(ByteStringView(data, size)); return 0; } |