This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Fix elf32-mips.c
- To: binutils at sourceware dot cygnus dot com
- Subject: PATCH: Fix elf32-mips.c
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Tue, 23 Oct 2001 09:04:23 -0700
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