SHA256
8
0
forked from pool/tinyxml

Accepting request 927321 from home:cvoegl:branches:devel:libraries:c_c++

- Added tinyxml-2.62-fix-infinite-loop.patch to fix an infinite loop
  for inputs containing the sequence 0xEF0x00 (bsc#1191576)

OBS-URL: https://build.opensuse.org/request/show/927321
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tinyxml?expand=0&rev=20
This commit is contained in:
Christian Vögl
2021-10-27 11:12:21 +00:00
committed by Git OBS Bridge
parent a43b129e52
commit ee0de8fc0c
3 changed files with 30 additions and 5 deletions

View File

@@ -0,0 +1,17 @@
diff --git a/tinyxmlparser.cpp b/tinyxmlparser.cpp
index 81b7eae..8aa0dfa 100755
--- a/tinyxmlparser.cpp
+++ b/tinyxmlparser.cpp
@@ -274,6 +274,12 @@ void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding )
else
{ p +=3; ++col; } // A normal character.
}
+ else
+ {
+ // TIXML_UTF_LEAD_0 (239) is the start character of a 3 byte sequence, so
+ // there is something wrong here. Just advance the pointer to evade infinite loops
+ ++p;
+ }
}
else
{