Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion maldoca/ole/oss_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,12 @@ bool BufferToUtf8::ConvertEncodingBufferToUTF8String(absl::string_view input,

xmlDocPtr XmlParseMemory(const char* buffer, int size) {
absl::call_once(once_init, &InitSAXHandler);
return xmlSAXParseMemory(&sax_handler, buffer, size, 0);
xmlParserCtxtPtr ctxt = xmlNewParserCtxt();
*ctxt->sax = sax_handler;
xmlDocPtr doc = xmlCtxtReadMemory(ctxt, buffer, size,
NULL /* URL */, NULL /* encoding */, 0 /* options */);
xmlFreeParserCtxt(ctxt);
return doc;
}

// Converts an `xmlChar*` object to a string_view.
Expand Down