From 1b58be7e74fd9ed4c4fac804663e8f61178fc017 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 23 Oct 2001 20:24:23 +0000 Subject: [PATCH] 2001-10-23 H.J. Lu * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check m != NULL before accessing it. --- bfd/ChangeLog | 5 +++++ bfd/elf32-mips.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fe0399f4c46..cd8e4afc8ce 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-10-23 H.J. Lu + + * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check + m != NULL before accessing it. + 2001-10-23 Alan Modra * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 0bd473dd94b..38b0f8b4235 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -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 -- 2.30.2