]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-bug-420.patch
- rpm-db-ver cap moved to -lib; release 57
[packages/rpm.git] / rpm-bug-420.patch
CommitLineData
fb9ef172
AM
1--- rpm-5.4.15/rpmdb/legacy.c~ 2019-03-09 00:37:45.000000000 +0100
2+++ rpm-5.4.15/rpmdb/legacy.c 2019-03-09 00:38:28.799270580 +0100
3@@ -113,7 +113,7 @@ ANNOTATE_IGNORE_READS_AND_WRITES_END();
4 bingo = 0;
5 while (!bingo && (scn = elf_nextscn(elf, scn)) != NULL) {
6 (void) gelf_getshdr(scn, &shdr);
7- if (shdr.sh_type != SHT_DYNAMIC)
8+ if (shdr.sh_type != SHT_DYNAMIC || shdr.sh_entsize == 0)
9 continue;
10 while (!bingo && (data = elf_getdata (scn, data)) != NULL) {
11 unsigned maxndx = (unsigned) (data->d_size / shdr.sh_entsize);
12--- rpm-5.4.15/lib/rpmds.c~ 2019-03-09 01:04:27.000000000 +0100
13+++ rpm-5.4.15/lib/rpmds.c 2019-03-09 01:11:06.792636867 +0100
14@@ -3187,7 +3187,7 @@ fprintf(stderr, "*** rpmdsELF(%s, %d, %p
15 case SHT_DYNAMIC:
16 data = NULL;
17 while ((data = elf_getdata (scn, data)) != NULL) {
18- for (cnt = 0; cnt < (int)(shdr->sh_size / shdr->sh_entsize); ++cnt) {
19+ for (cnt = 0; shdr->sh_entsize && cnt < (int)(shdr->sh_size / shdr->sh_entsize); ++cnt) {
20 dyn = gelf_getdyn (data, cnt, &dyn_mem);
21 if (dyn == NULL)
22 /*@innerbreak@*/ break;
This page took 0.024807 seconds and 4 git commands to generate.