From 8e753ca397ea332b29d65736b0e0bf9ad466df56 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Tue, 17 Apr 2018 18:45:50 +0000 Subject: Convert CFX_XMLParser to take a IFX_SeekableStream This CL changes the CFX_XMLParser to accept an IFX_SeekableStream intead of a CFX_SeekableStreamProxy. Change-Id: I3534288a8a00095acd78a60bf6b925c6a0357892 Reviewed-on: https://pdfium-review.googlesource.com/30856 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- testing/libfuzzer/pdf_xml_fuzzer.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'testing') diff --git a/testing/libfuzzer/pdf_xml_fuzzer.cc b/testing/libfuzzer/pdf_xml_fuzzer.cc index a8af779259..b9cb01580c 100644 --- a/testing/libfuzzer/pdf_xml_fuzzer.cc +++ b/testing/libfuzzer/pdf_xml_fuzzer.cc @@ -6,7 +6,7 @@ #include #include -#include "core/fxcrt/cfx_seekablestreamproxy.h" +#include "core/fxcrt/cfx_memorystream.h" #include "core/fxcrt/fx_safe_types.h" #include "core/fxcrt/fx_system.h" #include "core/fxcrt/xml/cfx_xmlnode.h" @@ -18,10 +18,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (!safe_size.IsValid()) return 0; - RetainPtr stream = - pdfium::MakeRetain(const_cast(data), - size); - + auto stream = pdfium::MakeRetain(const_cast(data), + size, false); auto root = pdfium::MakeUnique(); CFX_XMLParser parser(root.get(), stream); if (!parser.Parse()) -- cgit v1.2.3