diff --git a/backport-fix-a-double-free-error-when-there-are-three-empty-d.patch b/backport-fix-a-double-free-error-when-there-are-three-empty-d.patch new file mode 100644 index 0000000000000000000000000000000000000000..87a9731b178c088710a16f659952f5208319e24e --- /dev/null +++ b/backport-fix-a-double-free-error-when-there-are-three-empty-d.patch @@ -0,0 +1,29 @@ +From d07b2f010ff40f7980c602016ee2fcdedf921653 Mon Sep 17 00:00:00 2001 +From: wangyuhang <524413304@qq.com> +Date: Mon, 25 Aug 2025 19:31:53 +0800 +Subject: [PATCH] fix a double free error when there are three empty + description fields in the xinetd configuration + +--- + leveldb.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/leveldb.c b/leveldb.c +index 7450e75..eb8ee79 100644 +--- a/leveldb.c ++++ b/leveldb.c +@@ -267,8 +267,10 @@ int readXinetdServiceInfo(char *name, struct service *service) { + buf += 11; + if (readDescription(buf, start + sb.st_size, &serv.desc, + &eng_desc)) { +- if (serv.desc) ++ if (serv.desc) { + free(serv.desc); ++ serv.desc = NULL; ++ } + } + if (!serv.desc) { + if (eng_desc) +-- +2.43.0 + diff --git a/chkconfig.spec b/chkconfig.spec index 894aeaaa953e2b0b202eeeba0db67f384d3baf4e..0d3d8be679768fc1eccb4fc15cb0caef20940adf 100644 --- a/chkconfig.spec +++ b/chkconfig.spec @@ -1,6 +1,6 @@ Name: chkconfig Version: 1.14 -Release: 4 +Release: 5 Summary: chkconfig updates and queries runlevel information for system services License: GPLv2 URL: https://github.com/fedora-sysv/chkconfig @@ -14,6 +14,7 @@ Obsoletes: ntsysv < %{version}-%{release} Patch0: fix-coredump-while-parseServiceInfo-return-1.patch Patch6000: backport-leveldb-fix-systemdActive.patch +Patch6001: backport-fix-a-double-free-error-when-there-are-three-empty-d.patch %description chkconfig provides a simple command-line tool for maintaining @@ -61,6 +62,9 @@ mkdir -p %{buildroot}%{_sysconfdir}/chkconfig.d %{_mandir}/man8/* %changelog +* Wed Sep 10 2025 yixiangzhike - 1.14-5 +- fix a double free error + * Thu Aug 22 2024 dongyuzhen - 1.14-4 - fix systemdActive()