Page MenuHomeFreeBSD

D20852.id59393.diff
No OneTemporary

D20852.id59393.diff

Index: contrib/elftoolchain/elfcopy/sections.c
===================================================================
--- contrib/elftoolchain/elfcopy/sections.c
+++ contrib/elftoolchain/elfcopy/sections.c
@@ -1403,7 +1403,7 @@
struct section *s;
size_t indx, sizehint;
- if (elf_getshstrndx(ecp->ein, &indx) != 0) {
+ if (elf_getshdrstrndx(ecp->ein, &indx) == 0) {
shstrtab = elf_getscn(ecp->ein, indx);
if (shstrtab == NULL)
errx(EXIT_FAILURE, "elf_getscn failed: %s",
@@ -1413,6 +1413,8 @@
elf_errmsg(-1));
sizehint = shdr.sh_size;
} else {
+ /* Clear the error from elf_getshdrstrndx(3). */
+ (void)elf_errno();
sizehint = 0;
}

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 20, 12:24 AM (4 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29973698
Default Alt Text
D20852.id59393.diff (667 B)

Event Timeline