about summary refs log tree commit diff
path: root/elf/dl-runtime.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-05-21 23:51:18 -0700
committerPetr Baudis <pasky@ucw.cz>2010-05-31 19:00:37 +0200
commit4d4e902530cad7cd18570ad4b7bd7f31b33cce28 (patch)
tree659b57b59f78926f03de8f2c4d28ed381a8f42aa /elf/dl-runtime.c
parentd0d308e32b10a0776c6b7d5748b96bb5a9076f96 (diff)
downloadglibc-4d4e902530cad7cd18570ad4b7bd7f31b33cce28.tar.gz
glibc-4d4e902530cad7cd18570ad4b7bd7f31b33cce28.tar.xz
glibc-4d4e902530cad7cd18570ad4b7bd7f31b33cce28.zip
Don't crash on unresolved weak symbol reference when auditing.
(cherry picked from commit b32b8b451b398ebae33d4cf8039c03f4d615c0c3)
Diffstat (limited to 'elf/dl-runtime.c')
-rw-r--r--elf/dl-runtime.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index 181af7dfac..6847edafc6 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -232,8 +232,9 @@ _dl_profile_fixup (
 				       ? LOOKUP_VALUE_ADDRESS (result)
 					 + defsym->st_value : 0);
 
-	  if (__builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
-				== STT_GNU_IFUNC, 0))
+	  if (defsym != NULL
+	      && __builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
+				   == STT_GNU_IFUNC, 0))
 	    value = ((DL_FIXUP_VALUE_TYPE (*) (void))
 		     DL_FIXUP_VALUE_ADDR (value)) ();
 	}