[packages/libconfuse] Up to 3.4
arekm
arekm at pld-linux.org
Thu Nov 26 08:45:48 CET 2026
commit 913750c3d9165da658700dee9e5693fbf21a2319
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Nov 26 00:05:48 2026 +0100
Up to 3.4
Fixes CVE-2022-40320.
CVE-2022-40320.patch | 30 ------------------------------
libconfuse.spec | 15 +++++++++------
2 files changed, 9 insertions(+), 36 deletions(-)
---
diff --git a/libconfuse.spec b/libconfuse.spec
index 1e36848..654ab44 100644
--- a/libconfuse.spec
+++ b/libconfuse.spec
@@ -1,19 +1,19 @@
#
# Conditional build:
%bcond_without static_libs # don't build static library
+%bcond_without tests # build without tests
#
%define pname confuse
Summary: libConfuse - a library for parsing configuration files
Summary(pl.UTF-8): libConfuse - biblioteka do analizy plików konfiguracyjnych
Name: libconfuse
-Version: 3.3
-Release: 2
+Version: 3.4
+Release: 1
License: ISC
Group: Libraries
#Source0Download: https://github.com/libconfuse/libconfuse/releases
Source0: https://github.com/libconfuse/libconfuse/releases/download/v%{version}/%{pname}-%{version}.tar.xz
-# Source0-md5: a183cef2cecdd3783436ff8de500d274
-Patch0: CVE-2022-40320.patch
+# Source0-md5: c46243b90f4f9546e68525f09fa78ede
URL: https://github.com/libconfuse/libconfuse
BuildRequires: autoconf >= 2.50
BuildRequires: automake >= 1:1.11
@@ -71,7 +71,6 @@ Statyczna biblioteka libConfuse.
%prep
%setup -q -n %{pname}-%{version}
-%patch -P0 -p1
%build
%{__gettextize}
@@ -85,6 +84,10 @@ Statyczna biblioteka libConfuse.
%{__make}
+%if %{with tests}
+%{__make} check
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_examplesdir}/%{name}-%{version},%{_mandir}/man3,%{_pkgconfigdir}}
@@ -118,7 +121,7 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(644,root,root,755)
-%doc doc/html doc/tutorial-html
+%doc doc/html doc/tutorial.md
%{_libdir}/libconfuse.so
%{_includedir}/confuse.h
%{_pkgconfigdir}/libconfuse.pc
diff --git a/CVE-2022-40320.patch b/CVE-2022-40320.patch
deleted file mode 100644
index 7e53f74..0000000
--- a/CVE-2022-40320.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-# Fix CVE-2022-40320: heap-based buffer over-read in cfg_tilde_expand()
-# due to unterminated username passed to getpwnam().
-# https://github.com/libconfuse/libconfuse/commit/d73777c2c3566fb2647727bb56d9a2295b81669b
---- a/src/confuse.c 2026-03-14 11:48:51.537716579 +0100
-+++ b/src/confuse.c 2026-03-14 11:49:19.723663639 +0100
-@@ -1863,18 +1863,20 @@
- passwd = getpwuid(geteuid());
- file = filename + 1;
- } else {
-- /* ~user or ~user/path */
-- char *user;
-+ char *user; /* ~user or ~user/path */
-+ size_t len;
-
- file = strchr(filename, '/');
- if (file == 0)
- file = filename + strlen(filename);
-
-- user = malloc(file - filename);
-+ len = file - filename - 1;
-+ user = malloc(len + 1);
- if (!user)
- return NULL;
-
-- strncpy(user, filename + 1, file - filename - 1);
-+ strncpy(user, &filename[1], len);
-+ user[len] = 0;
- passwd = getpwnam(user);
- free(user);
- }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libconfuse.git/commitdiff/913750c3d9165da658700dee9e5693fbf21a2319
More information about the pld-cvs-commit
mailing list