Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148591508
D20852.id59393.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
667 B
Referenced Files
None
Subscribers
None
D20852.id59393.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D20852: elfcopy: Clear errors after fetching the shstrtab index.
Attached
Detach File
Event Timeline
Log In to Comment