[packages/mxml] Up to 2.12

arekm arekm at pld-linux.org
Sat Nov 28 17:47:14 CET 2026


commit e2a6694de1f2c5a8a2bf9361aa4600e7bc40d57a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Nov 27 16:16:45 2026 +0100

    Up to 2.12
    
    Fixes CVE-2018-20004.

 mxml-CVE-2018-20004.patch | 22 ++++++++++++++++++++++
 mxml-lpthread.patch       | 11 -----------
 mxml.spec                 | 19 ++++++++++---------
 3 files changed, 32 insertions(+), 20 deletions(-)
---
diff --git a/mxml.spec b/mxml.spec
index 840bbdd..94cea5f 100644
--- a/mxml.spec
+++ b/mxml.spec
@@ -1,16 +1,17 @@
 Summary:	Mini-XML: Lightweight XML support library
 Summary(pl.UTF-8):	Mini-XML - lekka biblioteka obsługująca XML
 Name:		mxml
-Version:	2.10
-Release:	2
+Version:	2.12
+Release:	1
 License:	LGPL v2 with exceptions
 Group:		Libraries
-Source0:	http://www.msweet.org/files/project3/%{name}-%{version}.tar.gz
-# Source0-md5:	8804c961a24500a95690ef287d150abe
-Patch0:		%{name}-lpthread.patch
+Source0:	https://github.com/michaelrsweet/mxml/releases/download/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	35f8416ee2d27ceab653ea2ff64c794c
+Patch0:		%{name}-CVE-2018-20004.patch
 URL:		http://www.minixml.org/
 BuildRequires:	autoconf
 BuildRequires:	sed >= 4.0
+BuildRequires:	zlib-devel
 # Conflicts due SONAME
 Conflicts:	libmxml
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -93,16 +94,16 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 # COPYING contains exceptions to LGPL
-%doc CHANGES COPYING README
+%doc CHANGES.md COPYING README.md
 %attr(755,root,root) %{_bindir}/mxmldoc
-%attr(755,root,root) %{_libdir}/libmxml.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libmxml.so.1
+%{_libdir}/libmxml.so.*.*
+%ghost %{_libdir}/libmxml.so.1
 %{_mandir}/man1/mxmldoc.1*
 
 %files devel
 %defattr(644,root,root,755)
 %doc doc/*.html
-%attr(755,root,root) %{_libdir}/libmxml.so
+%{_libdir}/libmxml.so
 %{_pkgconfigdir}/mxml.pc
 %{_includedir}/mxml.h
 %{_mandir}/man3/mxml.3*
diff --git a/mxml-CVE-2018-20004.patch b/mxml-CVE-2018-20004.patch
new file mode 100644
index 0000000..6cff853
--- /dev/null
+++ b/mxml-CVE-2018-20004.patch
@@ -0,0 +1,22 @@
+# CVE-2018-20004: stack buffer overflow in mxml_write_node() on "%f" of a large real
+# https://github.com/michaelrsweet/mxml/commit/4f5577dd4672d228e4180f06bdbd66f343ea45e0
+--- mxml-2.12/mxml-file.c.orig
++++ mxml-2.12/mxml-file.c
+@@ -2881,7 +2881,7 @@ mxml_write_node(mxml_node_t     *node,	/
+ 	      col ++;
+ 	  }
+ 
+-	  sprintf(s, "%d", current->value.integer);
++	  snprintf(s, sizeof(s), "%d", current->value.integer);
+ 	  if (mxml_write_string(s, p, putc_cb) < 0)
+ 	    return (-1);
+ 
+@@ -2911,7 +2911,7 @@ mxml_write_node(mxml_node_t     *node,	/
+ 	      col ++;
+ 	  }
+ 
+-	  sprintf(s, "%f", current->value.real);
++	  snprintf(s, sizeof(s), "%f", current->value.real);
+ 	  if (mxml_write_string(s, p, putc_cb) < 0)
+ 	    return (-1);
+ 
diff --git a/mxml-lpthread.patch b/mxml-lpthread.patch
deleted file mode 100644
index 240d369..0000000
--- a/mxml-lpthread.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- mxml-2.8/Makefile.in.orig	2014-04-19 10:26:41.746170424 +0200
-+++ mxml-2.8/Makefile.in	2014-04-19 10:37:35.666156796 +0200
-@@ -297,7 +297,7 @@
- 
- libmxml.so.1.5:	$(LIBOBJS)
- 	echo Creating $@...
--	$(DSO) $(DSOFLAGS) -o libmxml.so.1.5 $(LIBOBJS)
-+	$(DSO) $(DSOFLAGS) -o libmxml.so.1.5 $(LIBOBJS) -lpthread
- 	$(RM) libmxml.so libmxml.so.1
- 	$(LN) libmxml.so.1.5 libmxml.so
- 	$(LN) libmxml.so.1.5 libmxml.so.1
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mxml.git/commitdiff/e2a6694de1f2c5a8a2bf9361aa4600e7bc40d57a



More information about the pld-cvs-commit mailing list