| 1 | From: Guilhem Moulin <[email protected]>
|
| 2 | Date: Sat, 30 Dec 2023 14:15:54 +0100
|
| 3 | Subject: Avoid reachable assertion via crafted XML document with a '\0'
|
| 4 | located after whitespace
|
| 5 |
|
| 6 | Bug: https://www.forescout.com/resources/sierra21-vulnerabilities
|
| 7 | Bug-Debian: https://bugs.debian.org/1059315
|
| 8 | Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2023-34194
|
| 9 | Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2023-40462
|
| 10 | ---
|
| 11 | tinyxmlparser.cpp | 4 ++++
|
| 12 | 1 file changed, 4 insertions(+)
|
| 13 |
|
| 14 | diff --git a/tinyxmlparser.cpp b/tinyxmlparser.cpp
|
| 15 | index 8aa0dfa..1601962 100644
|
| 16 | |
| 17 | |
| 18 | @@ -1606,6 +1606,10 @@ const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXm
|
| 19 | }
|
| 20 |
|
| 21 | p = SkipWhiteSpace( p, _encoding );
|
| 22 | + if ( !p || !*p )
|
| 23 | + {
|
| 24 | + break;
|
| 25 | + }
|
| 26 | if ( StringEqual( p, "version", true, _encoding ) )
|
| 27 | {
|
| 28 | TiXmlAttribute attrib;
|