diff options
-rw-r--r-- | usr/src/cmd/sgs/elfdump/common/elfdump.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr/src/cmd/sgs/elfdump/common/elfdump.c b/usr/src/cmd/sgs/elfdump/common/elfdump.c index b2dd0afe1d..fb4f9f6883 100644 --- a/usr/src/cmd/sgs/elfdump/common/elfdump.c +++ b/usr/src/cmd/sgs/elfdump/common/elfdump.c @@ -25,6 +25,10 @@ */ /* + * Copyright (c) 2015, Joyent, Inc. All rights reserved. + */ + +/* * Dump an elf file. */ #include <stddef.h> @@ -4747,6 +4751,7 @@ shdr_cache(const char *file, Elf *elf, Ehdr *ehdr, size_t shstrndx, * final bytes. */ if ((_cache->c_shdr->sh_type == SHT_STRTAB) && + (_cache->c_data != NULL) && (_cache->c_data->d_buf != NULL) && (_cache->c_data->d_size > 0)) { const char *s = _cache->c_data->d_buf; |