submitted-rld_map
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sat, 1 Jun 2024 21:16:35 +0000 (23:16 +0200)
committerAurelien Jarno <aurel32@debian.org>
Sat, 1 Jun 2024 21:16:35 +0000 (23:16 +0200)
2010-05-20  Aurelien Jarno  <aurelien@aurel32.net>

* sysdeps/mips/dl-debug.h (ELF_MACHINE_DEBUG_SETUP): test for
RLD_MAP pointer before using it.

Gbp-Pq: Topic mips
Gbp-Pq: Name submitted-rld_map.diff

sysdeps/mips/dl-debug.h

index 584ae0da1c625eeffe28da3d764ab50d633bac0c..b4dd2c5f96757c313715830e852cd0f6decfa1bd 100644 (file)
@@ -33,7 +33,8 @@ elf_setup_debug_entry (struct link_map *l, struct r_debug *r)
       ptr += l->l_info[DT_MIPS (RLD_MAP_REL)]->d_un.d_val;
       *(ElfW(Addr) *) ptr = (ElfW(Addr)) r;
     }
-  else if (l->l_info[DT_MIPS (RLD_MAP)] != NULL)
+  else if (l->l_info[DT_MIPS (RLD_MAP)] != NULL &&
+      (l)->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr)
     *(ElfW(Addr) *) (l->l_info[DT_MIPS (RLD_MAP)]->d_un.d_ptr)
       = (ElfW(Addr)) r;
 }