Prevent alpha_vms_object_p stopping bfd_check_format_matches scan
Any error other than bfd_error_wrong_format returned from object_p() is effectively a fatal error. * vms-alpha.c (alpha_vma_object_p): Don't return file_truncated error. Remove redundant bfd_set_error.
This commit is contained in:
parent
bd25671c6f
commit
b138affb02
2 changed files with 7 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2014-08-29 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* vms-alpha.c (alpha_vma_object_p): Don't return file_truncated
|
||||||
|
error. Remove redundant bfd_set_error.
|
||||||
|
|
||||||
2014-08-29 Alan Modra <amodra@gmail.com>
|
2014-08-29 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* srec.c (srec_scan): Revert last change. Report an error for
|
* srec.c (srec_scan): Revert last change. Report an error for
|
||||||
|
|
|
@ -2474,10 +2474,7 @@ alpha_vms_object_p (bfd *abfd)
|
||||||
PRIV (recrd.rec) = buf;
|
PRIV (recrd.rec) = buf;
|
||||||
|
|
||||||
if (bfd_bread (buf, test_len, abfd) != test_len)
|
if (bfd_bread (buf, test_len, abfd) != test_len)
|
||||||
{
|
goto err_wrong_format;
|
||||||
bfd_set_error (bfd_error_file_truncated);
|
|
||||||
goto error_ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Is it an image? */
|
/* Is it an image? */
|
||||||
if ((bfd_getl32 (buf) == EIHD__K_MAJORID)
|
if ((bfd_getl32 (buf) == EIHD__K_MAJORID)
|
||||||
|
@ -2502,7 +2499,6 @@ alpha_vms_object_p (bfd *abfd)
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
{
|
{
|
||||||
PRIV (recrd.buf) = NULL;
|
PRIV (recrd.buf) = NULL;
|
||||||
bfd_set_error (bfd_error_no_memory);
|
|
||||||
goto error_ret;
|
goto error_ret;
|
||||||
}
|
}
|
||||||
PRIV (recrd.buf) = buf;
|
PRIV (recrd.buf) = buf;
|
||||||
|
@ -2517,10 +2513,7 @@ alpha_vms_object_p (bfd *abfd)
|
||||||
while (remaining > 0)
|
while (remaining > 0)
|
||||||
{
|
{
|
||||||
if (bfd_bread (buf + read_so_far, to_read, abfd) != to_read)
|
if (bfd_bread (buf + read_so_far, to_read, abfd) != to_read)
|
||||||
{
|
goto err_wrong_format;
|
||||||
bfd_set_error (bfd_error_file_truncated);
|
|
||||||
goto err_wrong_format;
|
|
||||||
}
|
|
||||||
|
|
||||||
read_so_far += to_read;
|
read_so_far += to_read;
|
||||||
remaining -= to_read;
|
remaining -= to_read;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue