summaryrefslogtreecommitdiff
path: root/binutils/od-xcoff.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2011-06-09 15:29:05 +0000
committerTristan Gingold <gingold@adacore.com>2011-06-09 15:29:05 +0000
commit4c23495ec3cf3e931b89724441a83fc9457a4c14 (patch)
tree602cb6877dc3a6e2730e20481072641be54e3d8b /binutils/od-xcoff.c
parent7ab1d000c11675aaea3b078e3e2a6cd3f1beaa08 (diff)
downloadbinutils-redhat-4c23495ec3cf3e931b89724441a83fc9457a4c14.tar.gz
2011-06-09 Tristan Gingold <gingold@adacore.com>
* od-xcoff.c (xcoff32_read_symbols): Allow missing string table length.
Diffstat (limited to 'binutils/od-xcoff.c')
-rw-r--r--binutils/od-xcoff.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/binutils/od-xcoff.c b/binutils/od-xcoff.c
index 47d0248847..5b8b5896eb 100644
--- a/binutils/od-xcoff.c
+++ b/binutils/od-xcoff.c
@@ -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))
{