Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elf-attrs.c
index 169b69738101559bb34cc4e3e751628d65de0d5a..070104c27344322d286c9b8cf2bd8ab17e4693d9 100644 (file)
@@ -436,11 +436,14 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr)
   bfd_byte *p_end;
   bfd_vma len;
   const char *std_sec;
+  ufile_ptr filesize;
 
   /* PR 17512: file: 2844a11d.  */
   if (hdr->sh_size == 0)
     return;
-  if (hdr->sh_size > bfd_get_file_size (abfd))
+
+  filesize = bfd_get_file_size (abfd);
+  if (filesize != 0 && hdr->sh_size > filesize)
     {
       /* xgettext:c-format */
       _bfd_error_handler (_("%pB: error: attribute section '%pA' too big: %#llx"),
This page took 0.022849 seconds and 4 git commands to generate.