mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-20 22:34:14 +08:00
Re: i386msdos uninitialised read
Another fix. * i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2020-03-26 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* i386msdos.c (msdos_object_p): Catch -1 return from bfd_bread.
|
||||||
|
|
||||||
2020-03-26 Alan Modra <amodra@gmail.com>
|
2020-03-26 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
|
* vms-alpha.c (dst_define_location): Limit size of dst_ptr_offsets
|
||||||
|
@ -50,7 +50,7 @@ msdos_object_p (bfd *abfd)
|
|||||||
bfd_size_type size;
|
bfd_size_type size;
|
||||||
|
|
||||||
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
|
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
|
||||||
|| (size = bfd_bread (&hdr, sizeof (hdr), abfd)) < DOS_HDR_SIZE)
|
|| (size = bfd_bread (&hdr, sizeof (hdr), abfd)) + 1 < DOS_HDR_SIZE + 1)
|
||||||
{
|
{
|
||||||
if (bfd_get_error () != bfd_error_system_call)
|
if (bfd_get_error () != bfd_error_system_call)
|
||||||
bfd_set_error (bfd_error_wrong_format);
|
bfd_set_error (bfd_error_wrong_format);
|
||||||
|
Reference in New Issue
Block a user