!282 Fix potential segmentation fault
From: @renxichen Reviewed-by: @xujing99 Signed-off-by: @xujing99
This commit is contained in:
commit
8aa781a4d1
@ -8,8 +8,8 @@ This patch helps to generate digest lists during rpm building process.
|
|||||||
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
|
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
|
||||||
Signed-off-by: Tianxing Zhang <zhangtianxing3@huawei.com>
|
Signed-off-by: Tianxing Zhang <zhangtianxing3@huawei.com>
|
||||||
---
|
---
|
||||||
build/files.c | 301 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
|
build/files.c | 304 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||||
1 file changed, 291 insertions(+), 10 deletions(-)
|
1 file changed, 294 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
diff --git a/build/files.c b/build/files.c
|
diff --git a/build/files.c b/build/files.c
|
||||||
index c43deb5..613de67 100644
|
index c43deb5..613de67 100644
|
||||||
@ -327,7 +327,7 @@ index c43deb5..613de67 100644
|
|||||||
* Add directory (and all of its files) to the package manifest.
|
* Add directory (and all of its files) to the package manifest.
|
||||||
* @param fl package file tree walk data
|
* @param fl package file tree walk data
|
||||||
* @param diskPath path to file
|
* @param diskPath path to file
|
||||||
@@ -2556,6 +2767,58 @@ static void addPackageFileList (struct FileList_s *fl, Package pkg,
|
@@ -2556,6 +2767,61 @@ static void addPackageFileList (struct FileList_s *fl, Package pkg,
|
||||||
argvFree(fileNames);
|
argvFree(fileNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,6 +351,9 @@ index c43deb5..613de67 100644
|
|||||||
+ if (!(s && *s))
|
+ if (!(s && *s))
|
||||||
+ goto exit;
|
+ goto exit;
|
||||||
+
|
+
|
||||||
|
+ if (!strchr(binRpm, '/'))
|
||||||
|
+ goto exit;
|
||||||
|
+
|
||||||
+ av_brp[2] = strchr(binRpm, '/') + 1;
|
+ av_brp[2] = strchr(binRpm, '/') + 1;
|
||||||
+ rpmlog(RPMLOG_NOTICE, _("Generating digest list: %s\n"), s);
|
+ rpmlog(RPMLOG_NOTICE, _("Generating digest list: %s\n"), s);
|
||||||
+
|
+
|
||||||
|
|||||||
5
rpm.spec
5
rpm.spec
@ -1,6 +1,6 @@
|
|||||||
Name: rpm
|
Name: rpm
|
||||||
Version: 4.15.1
|
Version: 4.15.1
|
||||||
Release: 53
|
Release: 54
|
||||||
Summary: RPM Package Manager
|
Summary: RPM Package Manager
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.rpm.org/
|
URL: http://www.rpm.org/
|
||||||
@ -505,6 +505,9 @@ make check || (cat tests/rpmtests.log; exit 0)
|
|||||||
%{_mandir}/man1/gendiff.1*
|
%{_mandir}/man1/gendiff.1*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 26 2023 renhongxun<renhongxun@h-partners.com> - 4.15.1-54
|
||||||
|
- Fix potential segmentation fault
|
||||||
|
|
||||||
* Tue Sep 05 2023 renhongxun<renhongxun@h-partners.com> - 4.15.1-53
|
* Tue Sep 05 2023 renhongxun<renhongxun@h-partners.com> - 4.15.1-53
|
||||||
- Fix the coredump which may occur during upgrading of rpm
|
- Fix the coredump which may occur during upgrading of rpm
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user