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