re PR ada/6919 (Ada patches applied to 3.1 branch only)

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

From-SVN: r59089
This commit is contained in:
Nathanael Nerode 2002-11-13 21:48:22 +00:00
parent cc41268d05
commit 1a083c0e90
2 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,8 @@
2002-11-13 Nathanael Nerode <neroden@gcc.gnu.org>
PR ada/6919
* adaint.c (__gnat_tmp_name): Remove buffer overflow bug on
GNU/Linux.
PR ada/6558
* config-lang.in: Remove diff_excludes.

View File

@ -709,7 +709,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