This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Security patch for binutils-2.11.92.0.10
- To: binutils at sources dot redhat dot com
- Subject: Security patch for binutils-2.11.92.0.10
- From: "Steven J. Hill" <sjhill at realitydiluted dot com>
- Date: Tue, 30 Oct 2001 10:54:54 -0600
Subject: Security patch for binutils-2.11.92.0.10
Attached please find some simple changes to make creation
of temporary files more secure. I just noticed it as a
warning when building binutils. Thanks.
-Steve
diff -urN binutils-2.11.92.0.10/binutils/bucomm.c binutils-2.11.92.0.10-patched/binutils/bucomm.c
--- binutils-2.11.92.0.10/binutils/bucomm.c Mon Oct 1 17:25:22 2001
+++ binutils-2.11.92.0.10-patched/binutils/bucomm.c Tue Oct 30 08:56:29 2001
@@ -233,14 +233,14 @@
#endif
strcat (tmpname, "/");
strcat (tmpname, template);
- mktemp (tmpname);
+ mkstemp (tmpname);
*slash = c;
}
else
{
tmpname = xmalloc (sizeof (template));
strcpy (tmpname, template);
- mktemp (tmpname);
+ mkstemp (tmpname);
}
return tmpname;
}
diff -urN binutils-2.11.92.0.10/libiberty/choose-temp.c binutils-2.11.92.0.10-patched/libiberty/choose-temp.c
--- binutils-2.11.92.0.10/libiberty/choose-temp.c Sat Oct 20 01:57:49 2001
+++ binutils-2.11.92.0.10-patched/libiberty/choose-temp.c Tue Oct 30 08:57:02 2001
@@ -65,7 +65,7 @@
strcpy (temp_filename, base);
strcpy (temp_filename + len, TEMP_FILE);
- mktemp (temp_filename);
+ mkstemp (temp_filename);
if (strlen (temp_filename) == 0)
abort ();
return temp_filename;