aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-09-20 04:20:26 +0000
committerAlan Modra <amodra@gmail.com>2000-09-20 04:20:26 +0000
commitb3ea35849fbbdfb9a2396e4e9369d28f8597338a (patch)
tree5e660b2b5007cb997e3f609c349ee48a32c6de54 /bfd
parent6091b433d78be72dd7970fcd91822ae2b9db7a81 (diff)
downloadfsf-binutils-gdb-b3ea35849fbbdfb9a2396e4e9369d28f8597338a.zip
fsf-binutils-gdb-b3ea35849fbbdfb9a2396e4e9369d28f8597338a.tar.gz
fsf-binutils-gdb-b3ea35849fbbdfb9a2396e4e9369d28f8597338a.tar.bz2
Handle out of memory situations.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/section.c2
2 files changed, 7 insertions, 0 deletions
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 <alan@linuxcare.com.au>
+
+ * section.c (bfd_get_unique_section_name): Return NULL if
+ bfd_malloc fails.
+
2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
* 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)