From 010221f636df2bf1dc30ad6f893e1f01e60c7002 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Fri, 12 Jan 2007 00:39:10 +0000 Subject: [PATCH] * choose-temp.c (choose_temp_base): Check the result of the call to mktemp rather than testing the length of the modified string. --- libiberty/ChangeLog | 5 +++++ libiberty/choose-temp.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index e72f84520..49afc1518 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2007-01-12 Ben Elliston + + * choose-temp.c (choose_temp_base): Check the result of the call + to mktemp rather than testing the length of the modified string. + 2006-12-20 Geoffrey Keating * cp-demangle.h: Add comment explaining what to do to avoid diff --git a/libiberty/choose-temp.c b/libiberty/choose-temp.c index 0cba9905d..4a26a827a 100644 --- a/libiberty/choose-temp.c +++ b/libiberty/choose-temp.c @@ -65,8 +65,7 @@ choose_temp_base (void) strcpy (temp_filename, base); strcpy (temp_filename + len, TEMP_FILE); - mktemp (temp_filename); - if (strlen (temp_filename) == 0) + if (mktemp (temp_filename) == 0) abort (); return temp_filename; } -- 2.11.4.GIT