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