summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/openbsd-compat/bsd-cygwin_util.c')
-rw-r--r--crypto/openssh/openbsd-compat/bsd-cygwin_util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/openssh/openbsd-compat/bsd-cygwin_util.c b/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
index f53abb6..ff394ec 100644
--- a/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
+++ b/crypto/openssh/openbsd-compat/bsd-cygwin_util.c
@@ -29,7 +29,7 @@
#include "includes.h"
-RCSID("$Id: bsd-cygwin_util.c,v 1.13 2004/08/30 10:42:08 dtucker Exp $");
+RCSID("$Id: bsd-cygwin_util.c,v 1.13.4.1 2005/05/25 09:42:40 dtucker Exp $");
#ifdef HAVE_CYGWIN
@@ -247,6 +247,7 @@ static struct wenv {
{ NL("COMMONPROGRAMFILES=") },
{ NL("COMPUTERNAME=") },
{ NL("COMSPEC=") },
+ { NL("CYGWIN=") },
{ NL("NUMBER_OF_PROCESSORS=") },
{ NL("OS=") },
{ NL("PATH=") },
@@ -260,7 +261,7 @@ static struct wenv {
{ NL("SYSTEMROOT=") },
{ NL("TMP=") },
{ NL("TEMP=") },
- { NL("WINDIR=") },
+ { NL("WINDIR=") }
};
char **
@@ -269,7 +270,7 @@ fetch_windows_environment(void)
char **e, **p;
int i, idx = 0;
- p = xmalloc(WENV_SIZ * sizeof(char *));
+ p = xmalloc((WENV_SIZ + 1) * sizeof(char *));
for (e = environ; *e != NULL; ++e) {
for (i = 0; i < WENV_SIZ; ++i) {
if (!strncmp(*e, wenv_arr[i].name, wenv_arr[i].namelen))
OpenPOWER on IntegriCloud