Security patch for binutils-2.11.92.0.10
Steven J. Hill
sjhill@realitydiluted.com
Tue Oct 30 08:55:00 GMT 2001
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;
More information about the Binutils
mailing list