Skip to content
Snippets Groups Projects
Commit 67cd51b8 authored by tromey's avatar tromey
Browse files

* java/lang/natPosixProcess.cc (startProcess): Don't use sprintf.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30996 138bc75d-0d04-0410-961f-82ee72b054a4
parent ef1d1bcb
No related merge requests found
1999-12-17 Tom Tromey <tromey@cygnus.com>
* java/lang/natPosixProcess.cc (startProcess): Don't use sprintf.
1999-12-16 Bryce McKinlay <bryce@albatross.co.nz>
* java/lang/Boolean.java (Boolean(String)): Set `value' to false on a
......
......@@ -168,12 +168,13 @@ java::lang::ConcreteProcess::startProcess (jstringArray progarray,
if (envp)
{
// preserve PATH unless specified explicitly
char *path_val = getenv("PATH");
char *path_val = getenv ("PATH");
environ = env;
if (getenv("PATH") == NULL)
if (getenv ("PATH") == NULL)
{
char *path_env = (char *) _Jv_Malloc (strlen(path_val) + 5 + 1);
sprintf (path_env, "PATH=%s", path_val);
char *path_env = (char *) _Jv_Malloc (strlen (path_val) + 5 + 1);
strcpy (path_env, "PATH=");
strcat (path_env, path_val);
putenv (path_env);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment