diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2016-07-25 22:52:58 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2016-11-11 12:58:27 -0500 |
commit | 54482898abe8d6d937ee67ea5974cd8eae859c37 (patch) | |
tree | 400a5d1fbfee1cb3b90f3a215f3da7b771dca3c9 /src | |
parent | b418ea1b66d0d5a08640d4edf3b65d4619c6ef7f (diff) | |
download | musl-54482898abe8d6d937ee67ea5974cd8eae859c37.tar.gz musl-54482898abe8d6d937ee67ea5974cd8eae859c37.tar.bz2 musl-54482898abe8d6d937ee67ea5974cd8eae859c37.tar.xz musl-54482898abe8d6d937ee67ea5974cd8eae859c37.zip |
treat null vdso base same as missing
On s390x, the kernel provides AT_SYSINFO_EHDR, but sets it to zero, if the
program being run does not have a program interpreter. This causes
problems when running the dynamic linker directly.
Diffstat (limited to 'src')
-rw-r--r-- | src/internal/vdso.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/internal/vdso.c b/src/internal/vdso.c index a4862171..d46d3228 100644 --- a/src/internal/vdso.c +++ b/src/internal/vdso.c @@ -45,6 +45,7 @@ void *__vdsosym(const char *vername, const char *name) size_t i; for (i=0; libc.auxv[i] != AT_SYSINFO_EHDR; i+=2) if (!libc.auxv[i]) return 0; + if (!libc.auxv[i+1]) return 0; Ehdr *eh = (void *)libc.auxv[i+1]; Phdr *ph = (void *)((char *)eh + eh->e_phoff); size_t *dynv=0, base=-1; |