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