File: submitted-rld_map.diff

package info (click to toggle)
glibc 2.41-6
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 299,136 kB
  • sloc: ansic: 1,049,882; asm: 238,842; makefile: 20,311; python: 13,537; sh: 11,812; cpp: 5,197; awk: 1,795; perl: 317; yacc: 292; pascal: 182; sed: 19
file content (21 lines) | stat: -rw-r--r-- 674 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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.

---
 sysdeps/mips/dl-debug.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/sysdeps/mips/dl-debug.h
+++ b/sysdeps/mips/dl-debug.h
@@ -33,7 +33,8 @@
       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;
 }