X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=rpm-div0.patch;fp=rpm-div0.patch;h=54775bd071ecfd2efe8b60f9204e1eb47b5f5616;hb=6b91893f65d6ff7d98c6482599fa723905754f77;hp=0000000000000000000000000000000000000000;hpb=92959858e09949b2b69d5da023f08053e21c3557;p=packages%2Frpm.git diff --git a/rpm-div0.patch b/rpm-div0.patch new file mode 100644 index 0000000..54775bd --- /dev/null +++ b/rpm-div0.patch @@ -0,0 +1,24 @@ +diff -ur rpm-4.5.orig/lib/rpmds.c rpm-4.5/lib/rpmds.c +--- rpm-4.5.orig/lib/rpmds.c 2019-06-01 18:55:39.433000000 +0200 ++++ rpm-4.5/lib/rpmds.c 2019-08-16 10:50:36.274000000 +0200 +@@ -3008,6 +3008,8 @@ + case SHT_DYNAMIC: + data = NULL; + while ((data = elf_getdata (scn, data)) != NULL) { ++ if (shdr->sh_entsize == 0) ++ continue; + /*@-boundswrite@*/ + for (cnt = 0; cnt < (shdr->sh_size / shdr->sh_entsize); ++cnt) { + dyn = gelf_getdyn (data, cnt, &dyn_mem); +diff -ur rpm-4.5.orig/rpmdb/legacy.c rpm-4.5/rpmdb/legacy.c +--- rpm-4.5.orig/rpmdb/legacy.c 2007-07-30 04:28:13.000000000 +0200 ++++ rpm-4.5/rpmdb/legacy.c 2019-08-16 10:35:01.076000000 +0200 +@@ -99,7 +99,7 @@ + /*@-branchstate -uniondef @*/ + 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) { + int maxndx = data->d_size / shdr.sh_entsize;