[packages/rpm] - rel 50; fix one more floating point exception

arekm arekm at pld-linux.org
Sat Mar 9 01:23:45 CET 2019


commit fb9ef17291e945d53463a4c9f875e24c6c2fc129
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Mar 9 01:23:16 2019 +0100

    - rel 50; fix one more floating point exception

 rpm-bug-420.patch | 22 ++++++++++++++++++++++
 rpm.spec          |  4 +++-
 2 files changed, 25 insertions(+), 1 deletion(-)
---
diff --git a/rpm.spec b/rpm.spec
index 0875abc..e67300d 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -47,7 +47,7 @@ Summary(ru.UTF-8):	Менеджер пакетов от RPM
 Summary(uk.UTF-8):	Менеджер пакетів від RPM
 Name:		rpm
 Version:	5.4.15
-Release:	48
+Release:	50
 License:	LGPL v2.1
 Group:		Base
 # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm
@@ -156,6 +156,7 @@ Patch64:	%{name}-fix-compress-doc.patch
 Patch65:	%{name}-parseSpec-skip-empty-tags.patch
 Patch66:	%{name}-payload-use-hashed-inode.patch
 Patch67:	%{name}-repackage-dont-force-max-compression.patch
+Patch68:	rpm-bug-420.patch
 Patch70:	python-%{name}sense-missingok.patch
 Patch71:	%{name}-changelog-encoding.patch
 Patch72:	%{name}-preserve-tag-type.patch
@@ -942,6 +943,7 @@ cd -
 %patch65 -p1
 %patch66 -p1
 %patch67 -p1
+%patch68 -p1
 %patch70 -p1
 %patch71 -p1
 %patch72 -p1
diff --git a/rpm-bug-420.patch b/rpm-bug-420.patch
new file mode 100644
index 0000000..9581736
--- /dev/null
+++ b/rpm-bug-420.patch
@@ -0,0 +1,22 @@
+--- rpm-5.4.15/rpmdb/legacy.c~	2019-03-09 00:37:45.000000000 +0100
++++ rpm-5.4.15/rpmdb/legacy.c	2019-03-09 00:38:28.799270580 +0100
+@@ -113,7 +113,7 @@ ANNOTATE_IGNORE_READS_AND_WRITES_END();
+     bingo = 0;
+     while (!bingo && (scn = elf_nextscn(elf, scn)) != NULL) {
+ 	(void) gelf_getshdr(scn, &shdr);
+-	if (shdr.sh_type != SHT_DYNAMIC)
++	if (shdr.sh_type != SHT_DYNAMIC || shdr.sh_entsize == 0)
+ 	    continue;
+ 	while (!bingo && (data = elf_getdata (scn, data)) != NULL) {
+ 	    unsigned maxndx = (unsigned) (data->d_size / shdr.sh_entsize);
+--- rpm-5.4.15/lib/rpmds.c~	2019-03-09 01:04:27.000000000 +0100
++++ rpm-5.4.15/lib/rpmds.c	2019-03-09 01:11:06.792636867 +0100
+@@ -3187,7 +3187,7 @@ fprintf(stderr, "*** rpmdsELF(%s, %d, %p
+ 	case SHT_DYNAMIC:
+ 	    data = NULL;
+ 	    while ((data = elf_getdata (scn, data)) != NULL) {
+-		for (cnt = 0; cnt < (int)(shdr->sh_size / shdr->sh_entsize); ++cnt) {
++		for (cnt = 0; shdr->sh_entsize && cnt < (int)(shdr->sh_size / shdr->sh_entsize); ++cnt) {
+ 		    dyn = gelf_getdyn (data, cnt, &dyn_mem);
+ 		    if (dyn == NULL)
+ 			/*@innerbreak@*/ break;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/fb9ef17291e945d53463a4c9f875e24c6c2fc129



More information about the pld-cvs-commit mailing list