-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DT_NEEDED not listed for ELF32 files. #4
Comments
Good catch. I've submitted a fix. |
The new version segfaults on me, due to the |
Ugh! I must have messed up my test somehow. |
This addresses issue #4, again. Hopefully for real this time.
I've submitted a replacement fix. Less elegant, but this one actually works. |
Yes, now I'm getting the expected results on the files that first brought the issue to light. |
On line 504 getlibraries() in elfls.c:
count = proghdr[i].p_filesz / sizeof *dyns;
Where
sizeof(*dyns) == sizeof(Elf64_Dyn)
. Given a 32-bit ELF file, where count is half of what it's supposed to be, given sufficiently many dynamic sections, DT_STRSZ or DT_STRTAB might be beyond the erronuous count, and getlibraries returns 0 prematurely, without listings any needed libraries.The text was updated successfully, but these errors were encountered: