submitted-rld_map
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sat, 27 Aug 2022 11:38:11 +0000 (12:38 +0100)
committerAurelien Jarno <aurel32@debian.org>
Sat, 27 Aug 2022 11:38:11 +0000 (12:38 +0100)
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 45a394907a98be32eb0eb3f2a69ecc71a88404e6..15572b3adc6787a144c5533ee9424db1a706f9ad 100644 (file)
@@ -76,7 +76,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)