Prevent a memory exhaustion problem when trying to read in strings from a COFF binary with a corrupt string table size.
PR 22507 * coffgen.c (_bfd_coff_read_string_table): Check for an excessive size of the external string table.
This commit is contained in:
parent
ff174d3ffa
commit
b0029dce68
@ -1,3 +1,9 @@
|
|||||||
|
2017-11-28 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR 22507
|
||||||
|
* coffgen.c (_bfd_coff_read_string_table): Check for an excessive
|
||||||
|
size of the external string table.
|
||||||
|
|
||||||
2017-11-28 Nick Clifton <nickc@redhat.com>
|
2017-11-28 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR 22506
|
PR 22506
|
||||||
|
@ -1718,7 +1718,7 @@ _bfd_coff_read_string_table (bfd *abfd)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strsize < STRING_SIZE_SIZE)
|
if (strsize < STRING_SIZE_SIZE || strsize > bfd_get_file_size (abfd))
|
||||||
{
|
{
|
||||||
_bfd_error_handler
|
_bfd_error_handler
|
||||||
/* xgettext: c-format */
|
/* xgettext: c-format */
|
||||||
|
Loading…
Reference in New Issue
Block a user