From b8f199c9386ed06ed819342902dfce1b7dca7aff Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Thu, 25 Aug 2022 18:16:34 +0100 Subject: [PATCH] submitted-rld_map 2010-05-20 Aurelien Jarno * 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 45a394907..15572b3ad 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -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) -- 2.30.2