diff options
author | dan sinclair <dsinclair@chromium.org> | 2018-04-17 18:45:50 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-17 18:45:50 +0000 |
commit | 8e753ca397ea332b29d65736b0e0bf9ad466df56 (patch) | |
tree | d8a53c3c3852ec6c4dd66dc69ce2b04f69d61742 /testing | |
parent | 5925398cc46eccdec720166c1b6bbb87cfb19564 (diff) | |
download | pdfium-8e753ca397ea332b29d65736b0e0bf9ad466df56.tar.xz |
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 <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r-- | testing/libfuzzer/pdf_xml_fuzzer.cc | 8 |
1 files changed, 3 insertions, 5 deletions
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 <cstdint> #include <memory> -#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<CFX_SeekableStreamProxy> stream = - pdfium::MakeRetain<CFX_SeekableStreamProxy>(const_cast<uint8_t*>(data), - size); - + auto stream = pdfium::MakeRetain<CFX_MemoryStream>(const_cast<uint8_t*>(data), + size, false); auto root = pdfium::MakeUnique<CFX_XMLNode>(); CFX_XMLParser parser(root.get(), stream); if (!parser.Parse()) |