aboutsummaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32/0001-utils-ldd-Check-for-returned-pointer-from-strrchr-no.patch
blob: 4764e006dc790dd4e41d85d7c2de8a138af0e803 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 85f4b028d767fc390a7b866d2f58d58be489242d Mon Sep 17 00:00:00 2001
From: Kevin Day <thekevinday@gmail.com>
Date: Wed, 30 Mar 2011 04:51:22 -0700
Subject: [PATCH] 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>
---
 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.4.4