mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 13:56:22 +08:00
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.
This commit is contained in:
@ -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>
|
2007-07-25 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* linker.c (generic_link_add_symbol_list): Warning fix.
|
* linker.c (generic_link_add_symbol_list): Warning fix.
|
||||||
|
@ -1444,9 +1444,11 @@ _bfd_coff_get_external_symbols (bfd *abfd)
|
|||||||
symesz = bfd_coff_symesz (abfd);
|
symesz = bfd_coff_symesz (abfd);
|
||||||
|
|
||||||
size = obj_raw_syment_count (abfd) * symesz;
|
size = obj_raw_syment_count (abfd) * symesz;
|
||||||
|
if (size == 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
syms = bfd_malloc (size);
|
syms = bfd_malloc (size);
|
||||||
if (syms == NULL && size != 0)
|
if (syms == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
|
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
|
||||||
|
Reference in New Issue
Block a user