From e6e10e3d84c90c7cac37b34dcd847e38c262690a Mon Sep 17 00:00:00 2001 From: zhangzikang1992 Date: Fri, 6 Sep 2024 11:24:34 +0800 Subject: [PATCH] libsubid: Dealocate memory on exit --- ...ow-libsubid-Dealocate-memory-on-exit.patch | 23 +++++++++++++++++++ shadow.spec | 6 ++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 shadow-libsubid-Dealocate-memory-on-exit.patch diff --git a/shadow-libsubid-Dealocate-memory-on-exit.patch b/shadow-libsubid-Dealocate-memory-on-exit.patch new file mode 100644 index 0000000..587db45 --- /dev/null +++ b/shadow-libsubid-Dealocate-memory-on-exit.patch @@ -0,0 +1,23 @@ +From 18f113cc4609e00c4f95072dbe954174f2c29be1 Mon Sep 17 00:00:00 2001 +From: Daniel Bershatsky +Date: Wed, 12 Jun 2024 19:26:45 +0300 +Subject: [PATCH] libsubid: Dealocate memory on exit + +--- + src/getsubids.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/getsubids.c b/src/getsubids.c +index fb645b19..0753abd7 100644 +--- a/src/getsubids.c ++++ b/src/getsubids.c +@@ -45,5 +45,6 @@ int main(int argc, char *argv[]) + printf("%d: %s %lu %lu\n", i, owner, + ranges[i].start, ranges[i].count); + } ++ free(ranges); + return 0; + } +-- +2.27.0 + diff --git a/shadow.spec b/shadow.spec index 6552942..8659663 100644 --- a/shadow.spec +++ b/shadow.spec @@ -1,6 +1,6 @@ Name: shadow Version: 4.14.3 -Release: 1 +Release: 2 Epoch: 2 License: BSD and GPLv2+ Summary: Tools for managing accounts and shadow password files @@ -19,6 +19,7 @@ Source7: newusers Patch0: usermod-unlock.patch Patch1: shadow-add-sm3-crypt-support.patch Patch2: shadow-Remove-encrypted-passwd-for-useradd-gr.patch +Patch3: shadow-libsubid-Dealocate-memory-on-exit.patch BuildRequires: gcc, libselinux-devel, audit-libs-devel, libsemanage-devel BuildRequires: libacl-devel, libattr-devel @@ -188,6 +189,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.{la,a} %{_mandir}/*/* %changelog +* Fri Sep 6 2024 zhangzikang - 2:4.14.3-2 +- libsubid: Dealocate memory on exit + * Thu Feb 1 2024 zhengxiaoxiao - 2:4.14.3-1 - update version to 4.14.3 -Avoid null pointer dereference -- Gitee