diff --git a/tinyxml-2.62-fix-infinite-loop.patch b/tinyxml-2.62-fix-infinite-loop.patch new file mode 100644 index 0000000..5897092 --- /dev/null +++ b/tinyxml-2.62-fix-infinite-loop.patch @@ -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 + { diff --git a/tinyxml.changes b/tinyxml.changes index f2bfaac..b3e46ec 100644 --- a/tinyxml.changes +++ b/tinyxml.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 25 14:32:25 UTC 2021 - Christian Vögl + +- Added tinyxml-2.62-fix-infinite-loop.patch to fix an infinite loop + for inputs containing the sequence 0xEF0x00 (bsc#1191576) + ------------------------------------------------------------------- Sun May 13 12:19:58 UTC 2012 - lists.nico.k@googlemail.com diff --git a/tinyxml.spec b/tinyxml.spec index 6c1b473..c9f049c 100644 --- a/tinyxml.spec +++ b/tinyxml.spec @@ -1,7 +1,7 @@ # # spec file for package tinyxml # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -34,7 +34,8 @@ Source4: use_stl_def Source5: Makefile.am.docs Patch0: tinyxml-c_headers.patch Patch1: tinyxml-entity.patch -Url: http://sourceforge.net/projects/tinyxml +Patch2: tinyxml-2.62-fix-infinite-loop.patch +URL: http://sourceforge.net/projects/tinyxml BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gcc-c++ BuildRequires: libtool @@ -60,7 +61,7 @@ TinyXML solves the text I/O file once and for all. %package devel Summary: Development files for libtinyxml -License: GPL-2.0+ +License: GPL-2.0-or-later Group: Development/Libraries/C and C++ Requires: %{lib_package} = %{version} Provides: libtinyxml-devel = %{version} @@ -73,7 +74,7 @@ developing applications that use libtinyxml. %package docs Summary: Documentaqtion for libtinyxml -License: GPL-2.0+ +License: GPL-2.0-or-later Group: Development/Libraries/C and C++ Requires: %{lib_package} = %{version} @@ -85,6 +86,7 @@ libtinyxml %setup -q -n tinyxml %patch0 %patch1 +%patch2 -p1 mkdir -p m4 cp %{S:1} %{S:2} %{S:3} %{S:4} . cp %{S:5} docs/Makefile.am