Fix a use-after-free bug in the BFD library when scanning a corrupt ELF file.
[deliverable/binutils-gdb.git] / bfd / elf32-mep.c
index f46e3bcbe36e633217592da5d7bf28a68129f554..c5775de6496dfbf63d76d1f48134a4e6bff6f395 100644 (file)
@@ -1,5 +1,5 @@
 /* MeP-specific support for 32-bit ELF.
-   Copyright (C) 2001-2019 Free Software Foundation, Inc.
+   Copyright (C) 2001-2020 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -717,10 +717,10 @@ mep_elf_object_p (bfd * abfd)
 }
 
 static bfd_boolean
-mep_elf_section_flags (flagword * flags, const Elf_Internal_Shdr * hdr)
+mep_elf_section_flags (const Elf_Internal_Shdr *hdr)
 {
   if (hdr->sh_flags & SHF_MEP_VLIW)
-    flags |= SEC_MEP_VLIW;
+    hdr->bfd_section->flags |= SEC_MEP_VLIW;
   return TRUE;
 }
 
This page took 0.038114 seconds and 4 git commands to generate.