From 689bbdceadf52a81aedf392803306828440b2199 Mon Sep 17 00:00:00 2001 From: liuzhilin Date: Fri, 21 Nov 2025 14:43:28 +0800 Subject: [PATCH] backport stream patch --- ...sing-undoing-of-group-size-expansion.patch | 37 +++++++++++++++++++ expat.spec | 7 +++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 backport-Fix-missing-undoing-of-group-size-expansion.patch diff --git a/backport-Fix-missing-undoing-of-group-size-expansion.patch b/backport-Fix-missing-undoing-of-group-size-expansion.patch new file mode 100644 index 0000000..ad014be --- /dev/null +++ b/backport-Fix-missing-undoing-of-group-size-expansion.patch @@ -0,0 +1,37 @@ +From 9f9680a8982bdbdf3f7fa6a8e65f7c36c3d3173e Mon Sep 17 00:00:00 2001 +From: liuzhilin +Date: Fri, 21 Nov 2025 17:57:28 +0800 +Subject: [PATCH] backport-Fix-missing-undoing-of-group-size-expansion + +https://github.com/libexpat/libexpat/commit/10fce9204a3adb23a067dd602214649324f72fdf + +--- + lib/xmlparse.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/lib/xmlparse.c b/lib/xmlparse.c +index a187a3a..8cf5816 100644 +--- a/lib/xmlparse.c ++++ b/lib/xmlparse.c +@@ -5921,14 +5921,17 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, + * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */ + #if UINT_MAX >= SIZE_MAX + if (parser->m_groupSize > (size_t)(-1) / sizeof(int)) { ++ parser->m_groupSize /= 2; + return XML_ERROR_NO_MEMORY; + } + #endif + + int *const new_scaff_index = REALLOC( + parser, dtd->scaffIndex, parser->m_groupSize * sizeof(int)); +- if (new_scaff_index == NULL) ++ if (new_scaff_index == NULL){ ++ parser->m_groupSize /= 2; + return XML_ERROR_NO_MEMORY; ++ } + dtd->scaffIndex = new_scaff_index; + } + } else { +-- +2.33.0 + diff --git a/expat.spec b/expat.spec index 214fd07..92ae5f4 100644 --- a/expat.spec +++ b/expat.spec @@ -1,11 +1,13 @@ Name: expat Version: 2.7.3 -Release: 1 +Release: 2 Summary: An XML parser library License: MIT URL: https://libexpat.github.io/ Source0: https://github.com/libexpat/libexpat/releases/download/R_%{version_major}_%{version_minor}_%{version_patch}/expat-%{version}.tar.xz +Patch6001: backport-Fix-missing-undoing-of-group-size-expansion.patch + BuildRequires: sed,autoconf,automake,gcc-c++,libtool,xmlto,make BuildRequires: cmake-rpm-macros @@ -61,6 +63,9 @@ rm -fv %{buildroot}%{_datadir}/doc/%{name}/changelog %{_mandir}/man1/* %changelog +* Fri Nov 21 2025 liuzhilin - 2.7.3-2 +- Fix-missing-undoing-of-group-size-expansion + * Thu Sep 25 2025 dillon chen -2.7.3-1 - update to 2.7.3 -- Gitee