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>
+
+ 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>
PR 22506
#endif
}
- if (strsize < STRING_SIZE_SIZE)
+ if (strsize < STRING_SIZE_SIZE || strsize > bfd_get_file_size (abfd))
{
_bfd_error_handler
/* xgettext: c-format */
bfd_set_error (bfd_error_bad_value);
return NULL;
}
-
+
strings = (char *) bfd_malloc (strsize + 1);
if (strings == NULL)
return NULL;