summaryrefslogtreecommitdiff
path: root/testing/fuzzers
diff options
context:
space:
mode:
Diffstat (limited to 'testing/fuzzers')
-rw-r--r--testing/fuzzers/pdf_xml_fuzzer.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/testing/fuzzers/pdf_xml_fuzzer.cc b/testing/fuzzers/pdf_xml_fuzzer.cc
index a3c399f78d..7f5fdb1532 100644
--- a/testing/fuzzers/pdf_xml_fuzzer.cc
+++ b/testing/fuzzers/pdf_xml_fuzzer.cc
@@ -6,7 +6,7 @@
#include <cstdint>
#include <memory>
-#include "core/fxcrt/cfx_memorystream.h"
+#include "core/fxcrt/cfx_readonlymemorystream.h"
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/xml/cfx_xmldocument.h"
@@ -19,9 +19,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (!safe_size.IsValid())
return 0;
- auto stream = pdfium::MakeRetain<CFX_MemoryStream>(const_cast<uint8_t*>(data),
- size, false);
-
+ auto stream = pdfium::MakeRetain<CFX_ReadOnlyMemoryStream>(data, size);
CFX_XMLParser parser(stream);
std::unique_ptr<CFX_XMLDocument> doc = parser.Parse();
if (!doc || !doc->GetRoot())