From c930e497fa9daf168099c97144aac4dc88d35222 Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Fri, 10 Jan 2020 22:21:25 +0000 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 e82891fa3..b4b36f12c 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -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) -- 2.30.2