adaint.c (__gnat_tmp_name): Remove buffer overflow bug on GNU/Linux.

* adaint.c (__gnat_tmp_name): Remove buffer overflow bug on
	        GNU/Linux.

From-SVN: r52567
This commit is contained in:
Florian Weimer 2002-04-21 08:59:36 +02:00 committed by Florian Weimer
parent 8d299c1070
commit 96e1fa9d15
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2002-04-21 Florian Weimer <fw@deneb.enyo.de>
* adaint.c (__gnat_tmp_name): Remove buffer overflow bug on
GNU/Linux.
2002-04-16 Mark Mitchell <mark@codesourcery.com>
* trans.c (tree_transform): Add has_scope argument to

View File

@ -4,7 +4,7 @@
* *
* A D A I N T *
* *
* $Revision: 1.6 $
* $Revision: 1.7 $
* *
* C Implementation File *
* *
@ -713,7 +713,7 @@ __gnat_tmp_name (tmp_filename)
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