]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elf-properties.c
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / bfd / elf-properties.c
index 199e61728e418f3b1fdb437ef11152b3cb67930b..491fa1aa8c67309a5c88881c9e8c30bec949d4c5 100644 (file)
@@ -1,5 +1,5 @@
 /* ELF program property support.
-   Copyright (C) 2017-2019 Free Software Foundation, Inc.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -86,7 +86,7 @@ _bfd_elf_parse_gnu_properties (bfd *abfd, Elf_Internal_Note *note)
 
   if (note->descsz < 8 || (note->descsz % align_size) != 0)
     {
-bad_size:
+    bad_size:
       _bfd_error_handler
        (_("warning: %pB: corrupt GNU_PROPERTY_TYPE (%ld) size: %#lx"),
         abfd, note->type, note->descsz);
@@ -186,7 +186,7 @@ bad_size:
        (_("warning: %pB: unsupported GNU_PROPERTY_TYPE (%ld) type: 0x%x"),
         abfd, note->type, type);
 
-next:
+    next:
       ptr += (datasz + (align_size - 1)) & ~ (align_size - 1);
     }
 
@@ -703,6 +703,8 @@ _bfd_elf_convert_gnu_properties (bfd *ibfd, asection *isec,
   if (size > bfd_section_size (isec))
     {
       contents = (bfd_byte *) bfd_malloc (size);
+      if (contents == NULL)
+       return FALSE;
       free (*ptr);
       *ptr = contents;
     }