projects/guix·blob python-team · refs

28 lines · 904 B

1From: Guilhem Moulin <[email protected]>
2Date: Sat, 30 Dec 2023 14:15:54 +0100
3Subject: Avoid reachable assertion via crafted XML document with a '\0'
4 located after whitespace
5
6Bug: https://www.forescout.com/resources/sierra21-vulnerabilities
7Bug-Debian: https://bugs.debian.org/1059315
8Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2023-34194
9Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2023-40462
10---
11 tinyxmlparser.cpp | 4 ++++
12 1 file changed, 4 insertions(+)
13
14diff --git a/tinyxmlparser.cpp b/tinyxmlparser.cpp
15index 8aa0dfa..1601962 100644
16--- a/tinyxmlparser.cpp
17+++ b/tinyxmlparser.cpp
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;