diff options
author | Richard Lowe <richlowe@richlowe.net> | 2014-12-11 22:37:52 -0500 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2015-01-27 11:13:13 -0500 |
commit | de1f518f033a642fe7aa3c2b59429241a01e387f (patch) | |
tree | c0e2f2c5693f22463b3210bc4c60a9321143f92f | |
parent | 7199059354284218c1c31276b0a51935fb228cc2 (diff) | |
download | illumos-joyent-de1f518f033a642fe7aa3c2b59429241a01e387f.tar.gz |
5547 libproc's fake_elf should give up if there's no .hash
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Adam Leventhal <adam.leventhal@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>
-rw-r--r-- | usr/src/lib/libproc/common/Psymtab_machelf32.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr/src/lib/libproc/common/Psymtab_machelf32.c b/usr/src/lib/libproc/common/Psymtab_machelf32.c index 472adfbbca..13ee1ac8de 100644 --- a/usr/src/lib/libproc/common/Psymtab_machelf32.c +++ b/usr/src/lib/libproc/common/Psymtab_machelf32.c @@ -366,6 +366,11 @@ fake_elf32(struct ps_prochandle *P, file_info_t *fptr, uintptr_t addr, hnchains = hash[1]; } + if ((d[DI_HASH] == NULL) || (hnbuckets == 0) || (hnchains == 0)) { + dprintf("empty or missing .hash\n"); + goto bad; + } + /* * .dynsym and .SUNW_ldynsym sections. * |