f4da33
diff --git a/parser/expat/lib/xmlparse.c b/parser/expat/lib/xmlparse.c
f4da33
--- a/parser/expat/lib/xmlparse.c
f4da33
+++ b/parser/expat/lib/xmlparse.c
f4da33
@@ -5652,12 +5652,18 @@
f4da33
   else
f4da33
 #endif /* XML_DTD */
f4da33
   {
f4da33
     processor = contentProcessor;
f4da33
     /* see externalEntityContentProcessor vs contentProcessor */
f4da33
-    return doContent(parser, parentParser ? 1 : 0, encoding, s, end,
f4da33
-                     nextPtr, (XML_Bool)!ps_finalBuffer);
f4da33
+    result = doContent(parser, parser->m_parentParser ? 1 : 0,
f4da33
+                       parser->m_encoding, s, end, nextPtr,
f4da33
+                       (XML_Bool)! parser->m_parsingStatus.finalBuffer);
f4da33
+    if (result == XML_ERROR_NONE) {
f4da33
+      if (! storeRawNames(parser))
f4da33
+        return XML_ERROR_NO_MEMORY;
f4da33
+    }
f4da33
+    return result;
f4da33
   }
f4da33
 }
f4da33
 
f4da33
 static enum XML_Error PTRCALL
f4da33
 errorProcessor(XML_Parser parser,
f4da33