[git commit master] utils: Fix ldd segfault

Carmelo Amoroso carmelo.amoroso at st.com
Mon May 24 07:07:45 UTC 2010


commit: http://git.uclibc.org/uClibc/commit/?id=b2c4199f0fd53c009858e7ce27f932a4ac92bc60
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Fixes ldd segfault on this testcase:

extern void _dl_getenv(void);
void foo(void)
{
    printf("foo: %x\n", &_dl_getenv);
}

linked as -shared

It fixes bug #1507

Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
---
 utils/ldd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/utils/ldd.c b/utils/ldd.c
index 7411c32..3858c81 100644
--- a/utils/ldd.c
+++ b/utils/ldd.c
@@ -576,7 +576,7 @@ static struct library *find_elf_interpreter(ElfW(Ehdr) *ehdr)
 				}
 				newlib->name = NULL;
 				newlib->path = NULL;
-				return NULL;
+				break;
 			}
 		}
 		if (newlib == NULL)
-- 
1.6.3.3



More information about the uClibc-cvs mailing list