fix invalid library phdr pointers passed to callback from dl_iterate_phdr
authorRich Felker <dalias@aerifal.cx>
Wed, 10 Jul 2013 18:38:20 +0000 (14:38 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 10 Jul 2013 18:38:20 +0000 (14:38 -0400)
map_library was saving pointers to an automatic-storage buffer rather
than pointers into the mapping. this should be a fairly simple fix,
but the patch here is slightly complicated by two issues:

1. supporting gratuitously obfuscated ELF files where the program
headers are not right at the beginning of the file.

2. cleaning up the map_library function so that data isn't clobbered
by the time we need it.


No differences found