summaryrefslogtreecommitdiff
path: root/testing/libfuzzer
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-04-09 17:27:55 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-09 17:27:55 +0000
commitd936d2931d86eb029feadd8aefbd3c7e51264a64 (patch)
tree6325dcc800614ef8c69e07b7ba90ccc83a836c0b /testing/libfuzzer
parent6f26db4dcbc64cc3602ffe22d1178a1abca83c96 (diff)
downloadpdfium-d936d2931d86eb029feadd8aefbd3c7e51264a64.tar.xz
Move the CFX_XMLParser out of CXFA_SimpleParser
This CL removes the CFX_XMLParser from CXFA_SimpleParser and constructs it in the CFX_XMLDoc. Change-Id: Id69b396f091892170a4c4654ac1d0fd65d1efbb6 Reviewed-on: https://pdfium-review.googlesource.com/29970 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing/libfuzzer')
-rw-r--r--testing/libfuzzer/pdf_xml_fuzzer.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/testing/libfuzzer/pdf_xml_fuzzer.cc b/testing/libfuzzer/pdf_xml_fuzzer.cc
index 3a2889421f..072f86c702 100644
--- a/testing/libfuzzer/pdf_xml_fuzzer.cc
+++ b/testing/libfuzzer/pdf_xml_fuzzer.cc
@@ -22,10 +22,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
RetainPtr<CFX_SeekableStreamProxy> stream =
pdfium::MakeRetain<CFX_SeekableStreamProxy>(const_cast<uint8_t*>(data),
size);
- auto doc = pdfium::MakeUnique<CFX_XMLDoc>();
- if (!doc->LoadXML(pdfium::MakeUnique<CFX_XMLParser>(doc->GetRoot(), stream)))
- return 0;
-
+ auto doc = pdfium::MakeUnique<CFX_XMLDoc>(stream);
if (doc->DoLoad() < 100)
return 0;