submitted-rld_map
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Tue, 15 Mar 2022 22:48:49 +0000 (22:48 +0000)
committerAurelien Jarno <aurel32@debian.org>
Tue, 15 Mar 2022 22:48:49 +0000 (22:48 +0000)
2010-05-20  Aurelien Jarno  <aurelien@aurel32.net>

* sysdeps/mips/dl-machine.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-machine.h

index 91fc640388a735c74a02d2f1093dc95d10fde23e..a52498e10c62d5b39967aa326134450063246cb9 100644 (file)
@@ -78,7 +78,8 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP_REL)]) \
         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)]) \
+     else if ((l)->l_info[DT_MIPS (RLD_MAP)] && \
+        (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); \
    } while (0)