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 | 353c55748aec7796b47b68bf09cc00a0808fd4be (patch) | |
tree | f0f04f321dfcc7f00bfa6a8fc8c8176049b5cab8 | |
parent | d429448cf8b93f302665bbd5303e06c61a7e6146 (diff) | |
download | gdb-353c55748aec7796b47b68bf09cc00a0808fd4be.zip gdb-353c55748aec7796b47b68bf09cc00a0808fd4be.tar.gz gdb-353c55748aec7796b47b68bf09cc00a0808fd4be.tar.bz2 |
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.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/coffgen.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d0f1e3f..61c4ad7 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +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. + 2007-07-25 Alan Modra <amodra@bigpond.net.au> * linker.c (generic_link_add_symbol_list): Warning fix. diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 7430cf6..f4f97b3 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 |