From: Geoff Norton Date: Mon, 14 Jun 2010 17:39:53 +0000 (+0000) Subject: 2010-06-14 Geoff Norton X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1817be347749012d99f8ae2d98802142dc3e4edd;p=gc 2010-06-14 Geoff Norton * dyn_load.c: Fix one other place where l_addr could be null on bionic. svn path=/trunk/mono/; revision=158891 --- diff --git a/ChangeLog b/ChangeLog index de4da8da..da66ce56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-06-14 Geoff Norton + + * dyn_load.c: Fix one other place where l_addr could be null on + bionic. + 2010-05-31 Geoff Norton * dyn_load.c: Its possible for linkmap->l_addr to be null for the diff --git a/dyn_load.c b/dyn_load.c index 63f64624..a42efd4e 100644 --- a/dyn_load.c +++ b/dyn_load.c @@ -250,7 +250,10 @@ void GC_register_dynamic_libraries() char * start; register int i; - e = (ElfW(Ehdr) *) lm->l_addr; + e = (ElfW(Ehdr) *) lm->l_addr; + if (e == NULL) + continue; + p = ((ElfW(Phdr) *)(((char *)(e)) + e->e_phoff)); offset = ((unsigned long)(lm->l_addr)); for( i = 0; i < (int)(e->e_phnum); ((i++),(p++)) ) {