alpha-coff: unitialised read
authorAlan Modra <amodra@gmail.com>
Tue, 31 Mar 2020 04:31:01 +0000 (15:01 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 31 Mar 2020 04:34:21 +0000 (15:04 +1030)
* coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
return value check.

bfd/ChangeLog
bfd/coff-alpha.c

index 1878fd79716df9e930d72c6f3cd8c72aca72194b..4c2bb14f6ccb99accce826655ba03659528e8639 100644 (file)
@@ -1,3 +1,8 @@
+2020-03-31  Alan Modra  <amodra@gmail.com>
+
+       * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
+       return value check.
+
 2020-03-31  Alan Modra  <amodra@gmail.com>
 
        * vms-alpha.c (image_write): Check bounds for sections without
index b86a8a259b584dd30481389b398fa4f6851ca932..4fd3b5c488dbeec3bcd055ce88316b73bb8232c4 100644 (file)
@@ -2130,7 +2130,7 @@ alpha_ecoff_get_elt_at_filepos (bfd *archive, file_ptr filepos)
                n = dict[h];
              else
                {
-                 if (! bfd_bread (&n, (bfd_size_type) 1, nbfd))
+                 if (bfd_bread (&n, 1, nbfd) != 1)
                    goto error_return;
                  dict[h] = n;
                }