Browse Source

utils/ldd: Check for returned pointer from strrchr not the value it holds

Signed-off-by: Kevin Day <thekevinday@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Kevin Day 13 years ago
parent
commit
85f4b028d7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      utils/ldd.c

+ 1 - 1
utils/ldd.c

@@ -553,7 +553,7 @@ static struct library *find_elf_interpreter(ElfW(Ehdr) *ehdr)
 		interp_name = strdup(s);
 		interp_dir = strdup(s);
 		tmp = strrchr(interp_dir, '/');
-		if (*tmp)
+		if (tmp)
 			*tmp = '\0';
 		else {
 			free(interp_dir);