diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2022-02-12 00:19:13 +0100 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2022-02-16 02:06:23 +0100 |
commit | 6881a4fc8596307ab9ff2e85e605afa2e413ab71 (patch) | |
tree | c9590353473638e26245e62a01dbe8d85dd3f18f /expat/lib/xmlparse.c | |
parent | f1a444ef64680ebd4ff89091a2c388cd046ece2d (diff) | |
download | libexpat-git-6881a4fc8596307ab9ff2e85e605afa2e413ab71.tar.gz |
lib: Fix (harmless) use of uninitialized memory
Diffstat (limited to 'expat/lib/xmlparse.c')
-rw-r--r-- | expat/lib/xmlparse.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 902895d5..c768f856 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -718,8 +718,7 @@ XML_ParserCreate(const XML_Char *encodingName) { XML_Parser XMLCALL XML_ParserCreateNS(const XML_Char *encodingName, XML_Char nsSep) { - XML_Char tmp[2]; - *tmp = nsSep; + XML_Char tmp[2] = {nsSep, 0}; return XML_ParserCreate_MM(encodingName, NULL, tmp); } @@ -1344,8 +1343,7 @@ XML_ExternalEntityParserCreate(XML_Parser oldParser, const XML_Char *context, would be otherwise. */ if (parser->m_ns) { - XML_Char tmp[2]; - *tmp = parser->m_namespaceSeparator; + XML_Char tmp[2] = {parser->m_namespaceSeparator, 0}; parser = parserCreate(encodingName, &parser->m_mem, tmp, newDtd); } else { parser = parserCreate(encodingName, &parser->m_mem, NULL, newDtd); |