From f76325499abbd5e5212cbe7b479008e3bf1b1a96 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 4 Sep 2000 17:52:42 +0000 Subject: * path.cc (readlink): Check if buffer length is positive. Truncate output to buffer length. Don't terminate buffer with '\0'. --- winsup/cygwin/spawn.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winsup/cygwin/spawn.cc') diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 770fea46d..39e2b391a 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -513,7 +513,7 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv, ciresrv.moreinfo->environ = (char **) cmalloc (HEAP_ARGV, envsize (envp, 1)); char **c; const char * const *e; - for (c = ciresrv.moreinfo->environ, e = envp; *e; ) + for (c = ciresrv.moreinfo->environ, e = envp; *e;) *c++ = cstrdup (*e++); *c = NULL; if (mode != _P_OVERLAY || -- cgit v1.2.3