2011-06-09 Tristan Gingold <gingold@adacore.com>

* od-xcoff.c (xcoff32_read_symbols): Allow missing string table
	length.
This commit is contained in:
Tristan Gingold 2011-06-09 15:29:05 +00:00
parent 94e4274dc0
commit e682d13b0a
2 changed files with 8 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2011-06-09 Tristan Gingold <gingold@adacore.com>
* od-xcoff.c (xcoff32_read_symbols): Allow missing string table
length.
2011-06-08 Nick Clifton <nickc@redhat.com>
PR binutils/12855

View File

@ -639,17 +639,14 @@ xcoff32_read_symbols (bfd *abfd, struct xcoff_dump *data)
+ data->nsyms * (unsigned)sizeof (struct external_syment);
/* Read string table. */
if (bfd_seek (abfd, stptr, SEEK_SET) != 0)
if (bfd_seek (abfd, stptr, SEEK_SET) != 0
|| bfd_bread (&stsz_arr, sizeof (stsz_arr), abfd) != sizeof (stsz_arr))
{
non_fatal (_("cannot read strings table length"));
data->strings_size = 0;
}
else
{
if (bfd_bread (&stsz_arr, sizeof (stsz_arr), abfd) != sizeof (stsz_arr))
{
non_fatal (_("cannot read strings table len"));
return;
}
data->strings_size = bfd_h_get_32 (abfd, stsz_arr);
if (data->strings_size > sizeof (stsz_arr))
{