ubsan: alpha-coff: signed integer overflow
authorAlan Modra <amodra@gmail.com>
Wed, 8 Jan 2020 20:11:25 +0000 (06:41 +1030)
committerAlan Modra <amodra@gmail.com>
Fri, 10 Jan 2020 07:02:33 +0000 (17:32 +1030)
* coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.

bfd/ChangeLog
bfd/coff-alpha.c

index aae0832e3d6269da1629d7df8cd383c3f3a496f3..68b15198b196c2ef27e8fa17ee3f7b8cfa15483e 100644 (file)
@@ -1,3 +1,7 @@
+2020-01-10  Alan Modra  <amodra@gmail.com>
+
+       * coff-alpha.c (alpha_ecoff_object_p): Calculate size in bfd_size_type.
+
 2020-01-09  Nick Clifton  <nickc@redhat.com>
 
        PR 25221
index 0baac2a24a2d54dadea44abd96571b564fc9ffcc..4b39bcc999dc0d49d3747bc9df5e80f5360a9fb8 100644 (file)
@@ -423,7 +423,7 @@ alpha_ecoff_object_p (bfd *abfd)
        {
          bfd_size_type size;
 
-         size = sec->line_filepos * 8;
+         size = (bfd_size_type) sec->line_filepos * 8;
          BFD_ASSERT (size == sec->size
                      || size + 8 == sec->size);
          if (!bfd_set_section_size (sec, size))