From fb9ef17291e945d53463a4c9f875e24c6c2fc129 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Sat, 9 Mar 2019 01:23:16 +0100 Subject: [PATCH] - rel 50; fix one more floating point exception --- rpm-bug-420.patch | 22 ++++++++++++++++++++++ rpm.spec | 4 +++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 rpm-bug-420.patch 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; 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 -- 2.43.0