Fix potential segmentation fault

This commit is contained in:
renxichen 2023-09-26 02:28:28 +00:00
parent 35c0766ea4
commit 6e620ddbf6
2 changed files with 10 additions and 4 deletions

View File

@ -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);
+

View File

@ -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<renhongxun@h-partners.com> - 4.18.1-9
- Fix potential segmentation fault
* Fri Sep 08 2023 renhongxun<renhongxun@h-partners.com> - 4.18.1-8
- support _disable_auto_rebuilddb macro in posttrans