diff options
| author | Jonathan Perkin <jperkin@joyent.com> | 2017-12-05 11:00:34 +0000 |
|---|---|---|
| committer | Trent Mick <trentm@gmail.com> | 2017-12-05 11:00:34 +0000 |
| commit | 08dd074bc0dac0dd5251487e949a1977f844781c (patch) | |
| tree | 7abf5b5351e47cd42a7329d6278bed27f306c380 | |
| parent | 86aa638917f0ec83401d6523f879fbdf56cde0b9 (diff) | |
| download | illumos-joyent-cr3035-OS-6458.tar.gz | |
OS-6458 elfedit failure with large stripped filecr3035-OS-6458
| -rw-r--r-- | usr/src/cmd/sgs/elfedit/common/elfedit_machelf.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr/src/cmd/sgs/elfedit/common/elfedit_machelf.c b/usr/src/cmd/sgs/elfedit/common/elfedit_machelf.c index 73653cd6e2..6abbc954fc 100644 --- a/usr/src/cmd/sgs/elfedit/common/elfedit_machelf.c +++ b/usr/src/cmd/sgs/elfedit/common/elfedit_machelf.c @@ -276,17 +276,20 @@ elfedit32_init_obj_state(const char *file, int fd, Elf *elf) switch (_cache->sec_shdr->sh_type) { case SHT_SYMTAB_SHNDX: symtab = get_symtab(obj_state, _cache); - symtab->symt_xshndx = ndx; + if (symtab != NULL) + symtab->symt_xshndx = ndx; break; case SHT_SUNW_syminfo: symtab = get_symtab(obj_state, _cache); - symtab->symt_syminfo = ndx; + if (symtab != NULL) + symtab->symt_syminfo = ndx; break; case SHT_SUNW_versym: symtab = get_symtab(obj_state, _cache); - symtab->symt_versym = ndx; + if (symtab != NULL) + symtab->symt_versym = ndx; break; } } |
