summaryrefslogtreecommitdiff
path: root/testing/libfuzzer/pdf_xml_fuzzer.cc
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-12 13:29:37 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-12 17:52:56 +0000
commit51114964fdb2a98f763318ce9affca906ed079e3 (patch)
tree0b5499f30ab34cd1f4f37b5368a766e57eca678a /testing/libfuzzer/pdf_xml_fuzzer.cc
parent661fcc0156b78fd40937c0844034605f430b94c6 (diff)
downloadpdfium-51114964fdb2a98f763318ce9affca906ed079e3.tar.xz
Fold CXFA_WideTextRead into IFGAS_Stream
This Cl moves CXFA_WideTextRead to be in the anonymous namespace of IFGAS_Stream and adds a IFGAS_Stream::CreateWideStringReadStream() method. This is done so we have all the implementations of IFGAS_Stream centralized. Change-Id: I9fbbf0a493fc2dd05fcd544e344268214a75d8a1 Reviewed-on: https://pdfium-review.googlesource.com/4052 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'testing/libfuzzer/pdf_xml_fuzzer.cc')
-rw-r--r--testing/libfuzzer/pdf_xml_fuzzer.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/testing/libfuzzer/pdf_xml_fuzzer.cc b/testing/libfuzzer/pdf_xml_fuzzer.cc
index 13eda60d77..8284bc6ce7 100644
--- a/testing/libfuzzer/pdf_xml_fuzzer.cc
+++ b/testing/libfuzzer/pdf_xml_fuzzer.cc
@@ -13,7 +13,7 @@
#include "xfa/fde/xml/cfde_xmldoc.h"
#include "xfa/fde/xml/cfde_xmlnode.h"
#include "xfa/fde/xml/cfde_xmlparser.h"
-#include "xfa/fxfa/parser/cxfa_widetextread.h"
+#include "xfa/fgas/crt/ifgas_stream.h"
namespace {
@@ -53,7 +53,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
CFX_WideString input =
CFX_WideString::FromUTF8(CFX_ByteStringC(data, safe_size.ValueOrDie()));
- auto stream = pdfium::MakeRetain<CXFA_WideTextRead>(input);
+ CFX_RetainPtr<IFGAS_Stream> stream =
+ IFGAS_Stream::CreateWideStringReadStream(input);
if (!stream)
return 0;