From b3ea35849fbbdfb9a2396e4e9369d28f8597338a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 20 Sep 2000 04:20:26 +0000 Subject: Handle out of memory situations. --- bfd/ChangeLog | 5 +++++ bfd/section.c | 2 ++ 2 files changed, 7 insertions(+) (limited to 'bfd') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index b3dc5cf..f5bc32f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2000-09-20 Alan Modra + + * section.c (bfd_get_unique_section_name): Return NULL if + bfd_malloc fails. + 2000-09-19 Michael Sokolov * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0 diff --git a/bfd/section.c b/bfd/section.c index e70cdaa..4c858f6 100644 --- a/bfd/section.c +++ b/bfd/section.c @@ -672,6 +672,8 @@ bfd_get_unique_section_name (abfd, templat, count) len = strlen (templat); sname = bfd_malloc (len + 8); + if (sname == NULL) + return NULL; strcpy (sname, templat); num = 1; if (count != NULL) -- cgit v1.1