diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-12 00:28:51 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-12 00:28:51 +0000 |
commit | 09a91f60962ba426a9ca9b64f6c5bcabd93d1dae (patch) | |
tree | bf1f4895c9f5a4731df82af8ff2bf65666e91701 | |
parent | 80aea2f1d26c615419d2d028087115c47f9fd46f (diff) |
gcc's use of /tmp files is raceable (as pointed out to me many months ago
by davem@iss.net). however this code is hard to fix. for the moment make
the race harder by calling mktemp with a lot of XXXXX's
-rw-r--r-- | gnu/usr.bin/gcc/gcc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/gcc/gcc.c b/gnu/usr.bin/gcc/gcc.c index fc6ca47e93b..b31e5e7a3ca 100644 --- a/gnu/usr.bin/gcc/gcc.c +++ b/gnu/usr.bin/gcc/gcc.c @@ -1587,12 +1587,12 @@ choose_temp_base () len = strlen (base); temp_filename = xmalloc (len + strlen (concat (dir_separator_str, - "ccXXXXXX")) + 1); + "ccXXXXXXXXXX")) + 1); strcpy (temp_filename, base); if (len > 0 && temp_filename[len-1] != '/' && temp_filename[len-1] != DIR_SEPARATOR) temp_filename[len++] = DIR_SEPARATOR; - strcpy (temp_filename + len, "ccXXXXXX"); + strcpy (temp_filename + len, "ccXXXXXXXXXX"); mktemp (temp_filename); temp_filename_length = strlen (temp_filename); |