aboutsummaryrefslogtreecommitdiff
path: root/binutils/ar.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/ar.c')
-rw-r--r--binutils/ar.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/binutils/ar.c b/binutils/ar.c
index 9675caf..e48249e 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -922,6 +922,9 @@ write_archive (bfd *iarch)
strcpy (old_name, bfd_get_filename (iarch));
new_name = make_tempname (old_name);
+ if (new_name == NULL)
+ bfd_fatal ("could not create temporary file whilst writing archive");
+
output_filename = new_name;
obfd = bfd_openw (new_name, bfd_get_target (iarch));