This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: Fix elf32-mips.c


A santity check.


H.J.
---
2001-10-23  H.J. Lu <hjl@gnu.org>

	* elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
	m != NULL before accessing it.

Index: elf32-mips.c
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elf32-mips.c,v
retrieving revision 1.48
diff -u -p -r1.48 elf32-mips.c
--- elf32-mips.c	2001/10/15 20:55:58	1.48
+++ elf32-mips.c	2001/10/23 16:00:35
@@ -3510,7 +3510,7 @@ _bfd_mips_elf_modify_segment_map (abfd)
 	if ((*pm)->p_type == PT_DYNAMIC)
 	  break;
       m = *pm;
-      if (IRIX_COMPAT (abfd) == ict_none)
+      if (m != NULL && IRIX_COMPAT (abfd) == ict_none)
 	{
 	  /* For a normal mips executable the permissions for the PT_DYNAMIC
 	     segment are read, write and execute. We do that here since


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]