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