[git commit prelink] utils/ldd: Check for returned pointer from strrchr not the value it holds

Khem Raj raj.khem at gmail.com
Wed Mar 30 11:53:36 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=85f4b028d767fc390a7b866d2f58d58be489242d
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/prelink

Signed-off-by: Kevin Day <thekevinday at gmail.com>
Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 utils/ldd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/utils/ldd.c b/utils/ldd.c
index 3858c81..904075c 100644
--- a/utils/ldd.c
+++ b/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);
-- 
1.7.3.4



More information about the uClibc-cvs mailing list