alpha-coff: unitialised read

* coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Correct bfd_bread
	return value check.
This commit is contained in:
Alan Modra 2020-03-31 15:01:01 +10:30
parent 8169954446
commit 89b599df37
2 changed files with 6 additions and 1 deletions

View 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

View 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;
}