aboutsummaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2014-04-30 15:48:40 +0100
committerTorne (Richard Coles) <torne@google.com>2014-05-02 14:25:45 +0100
commit26ec9679ff01fb155ae21015f31cc95bed24f670 (patch)
tree97478537891feb00d442d1e0eba5be1c0d64eefc /libc
parent07bab525e24725aaacd71e7cc63dfc31d48ba8a7 (diff)
downloadandroid_bionic-26ec9679ff01fb155ae21015f31cc95bed24f670.tar.gz
android_bionic-26ec9679ff01fb155ae21015f31cc95bed24f670.tar.bz2
android_bionic-26ec9679ff01fb155ae21015f31cc95bed24f670.zip
Handle empty relro segment or incorrectly sized file.
If the file has no relro segment, the generated relro file will have length 0, which caused mmap to fail. If the relro file has nonzero size, but is too short (e.g. because it's for the wrong version of the library), the linker would segfault while comparing the data. Fix both these issues: don't try to map a zero length file, and don't try to compare data that would be beyond the end of the file. Improve test to explicitly generate two versions of the library: one with -z relro, and one with -z norelro, so we can test both cases; also explicitly test the case where the relro file has length 0. Bug: 14299541 Change-Id: Id8b95585edda90e8bb5de452a35b70ed2d224934
Diffstat (limited to 'libc')
0 files changed, 0 insertions, 0 deletions