Don't read uninitialized members of XmlNode

This commit is contained in:
Ivan Skytte Jørgensen
2015-11-09 15:23:59 +01:00
committed by Ai Lin Chia
parent c7491ddc3e
commit e7be10182b

@ -3743,6 +3743,8 @@ bool Parms::setFromFile ( void *THIS ,
XmlNode *pn = &xml.m_nodes[i-1];
XmlNode *xn = &xml.m_nodes[i];
// look for <masterPassword>
if ( pn->m_nodeId != TAG_XMLTAG) continue;
if ( xn->m_nodeId != TAG_CDATA) continue;
if ( pn->m_tagNameLen != 14 ) continue;
if ( xn->m_tagNameLen != 8 ) continue;
// if it is not the OLD supported tag then skip
@ -3762,6 +3764,8 @@ bool Parms::setFromFile ( void *THIS ,
XmlNode *xn = &xml.m_nodes[i];
XmlNode *pn = &xml.m_nodes[i-1];
// look for <masterPassword>
if ( pn->m_nodeId != TAG_XMLTAG) continue;
if ( xn->m_nodeId != TAG_CDATA) continue;
if ( pn->m_tagNameLen != 8 ) continue;
if ( xn->m_tagNameLen != 8 ) continue;
// if it is not the OLD supported tag then skip