1From 6881a4fc8596307ab9ff2e85e605afa2e413ab71 Mon Sep 17 00:00:00 2001 2From: Sebastian Pipping <sebastian@pipping.org> 3Date: Sat, 12 Feb 2022 00:19:13 +0100 4Subject: [PATCH] lib: Fix (harmless) use of uninitialized memory 5 6--- 7 lib/xmlparse.c | 6 ++---- 8 1 file changed, 2 insertions(+), 4 deletions(-) 9 10diff --git a/lib/xmlparse.c b/lib/xmlparse.c 11index 902895d..c768f85 100644 12--- a/lib/xmlparse.c 13+++ b/lib/xmlparse.c 14@@ -718,8 +718,7 @@ XML_ParserCreate(const XML_Char *encodingName) { 15 16 XML_Parser XMLCALL 17 XML_ParserCreateNS(const XML_Char *encodingName, XML_Char nsSep) { 18- XML_Char tmp[2]; 19- *tmp = nsSep; 20+ XML_Char tmp[2] = {nsSep, 0}; 21 return XML_ParserCreate_MM(encodingName, NULL, tmp); 22 } 23 24@@ -1344,8 +1343,7 @@ XML_ExternalEntityParserCreate(XML_Parser oldParser, const XML_Char *context, 25 would be otherwise. 26 */ 27 if (parser->m_ns) { 28- XML_Char tmp[2]; 29- *tmp = parser->m_namespaceSeparator; 30+ XML_Char tmp[2] = {parser->m_namespaceSeparator, 0}; 31 parser = parserCreate(encodingName, &parser->m_mem, tmp, newDtd); 32 } else { 33 parser = parserCreate(encodingName, &parser->m_mem, NULL, newDtd); 34-- 351.8.3.1 36 37