summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/libfuzzer/pdf_xml_fuzzer.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/libfuzzer/pdf_xml_fuzzer.cc b/testing/libfuzzer/pdf_xml_fuzzer.cc
index 82627e1496..2ad57cf8bc 100644
--- a/testing/libfuzzer/pdf_xml_fuzzer.cc
+++ b/testing/libfuzzer/pdf_xml_fuzzer.cc
@@ -22,12 +22,12 @@ 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>(stream);
- if (doc->Load() < 100)
+ CFX_XMLDoc doc;
+ if (!doc.Load(stream))
return 0;
- CFX_XMLNode* pXMLFakeRoot = doc->GetRoot();
- for (CFX_XMLNode* pXMLNode = pXMLFakeRoot->GetFirstChild(); pXMLNode;
+ auto root = doc.GetTree();
+ for (CFX_XMLNode* pXMLNode = root->GetFirstChild(); pXMLNode;
pXMLNode = pXMLNode->GetNextSibling()) {
if (pXMLNode->GetType() == FX_XMLNODE_Element)
break;