From 6e620ddbf6fdb7b02812d717ac3388bd907e3ac9 Mon Sep 17 00:00:00 2001 From: renxichen Date: Tue, 26 Sep 2023 02:28:28 +0000 Subject: [PATCH] Fix potential segmentation fault --- Add-IMA-digest-list-support.patch | 9 ++++++--- rpm.spec | 5 ++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Add-IMA-digest-list-support.patch b/Add-IMA-digest-list-support.patch index 814e42c..e0573c4 100644 --- a/Add-IMA-digest-list-support.patch +++ b/Add-IMA-digest-list-support.patch @@ -4,14 +4,14 @@ Date: Fri, 16 Jun 2023 11:35:21 +0800 Subject: [PATCH] Add IMA digest list support --- - build/files.c | 302 ++++++++++++++++++++++++++++++++++++++-- + build/files.c | 305 ++++++++++++++++++++++++++++++++++++++-- build/parsePreamble.c | 3 +- macros.in | 1 + plugins/Makefile.am | 4 + plugins/selinux.c | 3 +- rpmio/rpmpgp_internal.c | 32 +---- rpmio/rpmpgp_internal.h | 29 ++++ - 7 files changed, 333 insertions(+), 41 deletions(-) + 7 files changed, 336 insertions(+), 41 deletions(-) diff --git a/build/files.c b/build/files.c index eb008ab..3fc3551 100644 @@ -337,7 +337,7 @@ index eb008ab..3fc3551 100644 /** * Add directory (and all of its files) to the package manifest. * @param fl package file tree walk data -@@ -2584,6 +2796,58 @@ static void addPackageFileList (struct FileList_s *fl, Package pkg, +@@ -2584,6 +2796,61 @@ static void addPackageFileList (struct FileList_s *fl, Package pkg, argvFree(fileNames); } @@ -361,6 +361,9 @@ index eb008ab..3fc3551 100644 + if (!(s && *s)) + goto exit; + ++ if (!strchr(binRpm, '/')) ++ goto exit; ++ + av_brp[2] = strchr(binRpm, '/') + 1; + rpmlog(RPMLOG_NOTICE, _("Generating digest list: %s\n"), s); + diff --git a/rpm.spec b/rpm.spec index 7a0cf06..a759989 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,6 +1,6 @@ Name: rpm Version: 4.18.1 -Release: 8 +Release: 9 Summary: RPM Package Manager License: GPLv2+ URL: http://www.rpm.org/ @@ -327,6 +327,9 @@ make clean %exclude %{_mandir}/man8/rpmspec.8.gz %changelog +* Tue Sep 26 2023 renhongxun - 4.18.1-9 +- Fix potential segmentation fault + * Fri Sep 08 2023 renhongxun - 4.18.1-8 - support _disable_auto_rebuilddb macro in posttrans