diff options
author | Michael Snyder <msnyder@vmware.com> | 2007-07-26 02:01:49 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2007-07-26 02:01:49 +0000 |
commit | 9ab312b18be5a39215c4743e53e0354d79c6495d (patch) | |
tree | 10ff787c15d879638d1ca035eda1e679ec7fd24f /bfd/coffgen.c | |
parent | cb38962f0897fb86f783005a03c726646752e5d7 (diff) | |
download | binutils-redhat-9ab312b18be5a39215c4743e53e0354d79c6495d.tar.gz |
2007-07-25 Michael Snyder <msnyder@access-company.com>
* coffgen.c (_bfd_coff_get_external_symbols): Nothing to be done
if size == 0; return and avoid possible null pointer issues.
Diffstat (limited to 'bfd/coffgen.c')
-rw-r--r-- | bfd/coffgen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 7430cf6a76..f4f97b3f0d 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -1444,9 +1444,11 @@ _bfd_coff_get_external_symbols (bfd *abfd) symesz = bfd_coff_symesz (abfd); size = obj_raw_syment_count (abfd) * symesz; + if (size == 0) + return TRUE; syms = bfd_malloc (size); - if (syms == NULL && size != 0) + if (syms == NULL) return FALSE; if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0 |