diff options
author | Alan Modra <amodra@gmail.com> | 2020-03-31 15:01:01 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-03-31 15:04:21 +1030 |
commit | 89b599df37111317b9bc6fab541eb94c8b0bea35 (patch) | |
tree | c74b5bf4bdf088144e777b965569173599a34ce0 /bfd | |
parent | 816995444667f936c918bc76f3945105c4e1ec1b (diff) | |
download | gdb-89b599df37111317b9bc6fab541eb94c8b0bea35.zip gdb-89b599df37111317b9bc6fab541eb94c8b0bea35.tar.gz gdb-89b599df37111317b9bc6fab541eb94c8b0bea35.tar.bz2 |
alpha-coff: unitialised read
* coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
return value check.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/coff-alpha.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 1878fd7..4c2bb14 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 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 contents too. Error on non-zero write to section without contents. diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c index b86a8a2..4fd3b5c 100644 --- a/bfd/coff-alpha.c +++ b/bfd/coff-alpha.c @@ -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; } |