This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
small patch re ada/6919, committed as obvious.
- From: Nathanael Nerode <neroden at twcny dot rr dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Nov 2002 16:50:10 -0500
- Subject: small patch re ada/6919, committed as obvious.
Recommitted (as obvious) this patch which was only committed on branch,
not on mainline.
2002-11-13 Nathanael Nerode <neroden@gcc.gnu.org>
PR ada/6919
* adaint.c (__gnat_tmp_name): Remove buffer overflow bug on
GNU/Linux.
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/adaint.c,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- gcc/gcc/ada/adaint.c 2002/02/07 23:53:29 1.7
+++ gcc/gcc/ada/adaint.c 2002/04/21 06:59:36 1.7.2.1
@@ -713,7 +713,7 @@
if (tmpdir == NULL)
strcpy (tmp_filename, "/tmp/gnat-XXXXXX");
else
- sprintf (tmp_filename, "%s/gnat-XXXXXX", tmpdir);
+ sprintf (tmp_filename, "%200s/gnat-XXXXXX", tmpdir);
close (mkstemp(tmp_filename));
#else