changeset 5074:320193a797e9

6602992 file(1) command does not understand ELF files with extended indices (fix lint)
author ab196087
date Mon, 17 Sep 2007 14:46:54 -0700
parents f58210285b45
children 199eb2ec2c2c
files usr/src/cmd/file/elf_read.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/file/elf_read.c	Mon Sep 17 14:37:12 2007 -0700
+++ b/usr/src/cmd/file/elf_read.c	Mon Sep 17 14:46:54 2007 -0700
@@ -181,7 +181,8 @@
 	EI_Ehdr_shstrndx = EI_Ehdr.e_shstrndx;
 	if (((EI_Ehdr_shnum == 0) || (EI_Ehdr_phnum == PN_XNUM)) &&
 	    (EI_Ehdr.e_shoff != 0)) {
-		get_shdr(EI, 0);
+		if (get_shdr(EI, 0) == ELF_READ_FAIL)
+			return (ELF_READ_FAIL);
 		if (EI_Ehdr_shnum == 0)
 			EI_Ehdr_shnum = EI_Shdr.sh_size;
 		if ((EI_Ehdr_phnum == PN_XNUM) && (EI_Shdr.sh_info != 0))