diff options
author | George Hazan <ghazan@miranda.im> | 2020-04-01 14:05:09 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-04-01 14:05:09 +0300 |
commit | b7c9b0c944378ccf373d9daf0dac62dc81a7930e (patch) | |
tree | dc3e314a1d9740fb5bbbfb6a8b043c1cff072781 /src/mir_core | |
parent | 5a679edabed89538d0aa96a4d4a96718c0a37572 (diff) |
fixes #2243 (Jabber: buggy OpenFire stanzas drive Miranda crazy)
more information here: https://issues.igniterealtime.org/browse/OF-870
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/src/tinyxml2.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mir_core/src/tinyxml2.cpp b/src/mir_core/src/tinyxml2.cpp index b4ece2f203..919ffa30bd 100644 --- a/src/mir_core/src/tinyxml2.cpp +++ b/src/mir_core/src/tinyxml2.cpp @@ -1917,11 +1917,17 @@ char* XMLElement::ParseAttributes( char* p, int* curLineNumPtr ) const int attrLineNum = attrib->_parseLineNum; p = attrib->ParseDeep( p, _document->ProcessEntities(), curLineNumPtr ); - if ( !p || Attribute( attrib->Name() ) ) { + if ( !p ) { DeleteAttribute( attrib ); _document->SetError( XML_ERROR_PARSING_ATTRIBUTE, attrLineNum, "XMLElement name=%s", Name() ); return 0; } + + if (Attribute(attrib->Name())) { + DeleteAttribute(attrib); + continue; + } + // There is a minor bug here: if the attribute in the source xml // document is duplicated, it will not be detected and the // attribute will be doubly added. However, tracking the 'prevAttribute' |