summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--openbsd-compat/bsd-cygwin_util.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a7eab8fc9..24605b538 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@
6 idea, it is now known as UNSUPPORTED_POSIX_THREADS_HACK. Attempting to use 6 idea, it is now known as UNSUPPORTED_POSIX_THREADS_HACK. Attempting to use
7 USE_POSIX_THREADS will now generate an error so we don't silently change 7 USE_POSIX_THREADS will now generate an error so we don't silently change
8 behaviour. ok djm@ 8 behaviour. ok djm@
9 - (dtucker) [openbsd-compat/bsd-cygwin_util.c] Ensure sufficient memory
10 allocation when retrieving core Windows environment. Add CYGWIN variable
11 to propagated variables. Patch from vinschen at redhat.com, ok djm@
9 12
1020050524 1320050524
11 - (djm) [openbsd-compat/readpassphrase.c] bz #950: Retry tcsetattr to ensure 14 - (djm) [openbsd-compat/readpassphrase.c] bz #950: Retry tcsetattr to ensure
@@ -2492,4 +2495,4 @@
2492 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 2495 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
2493 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 2496 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
2494 2497
2495$Id: ChangeLog,v 1.3758 2005/05/25 06:18:09 dtucker Exp $ 2498$Id: ChangeLog,v 1.3759 2005/05/25 09:42:10 dtucker Exp $
diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
index f53abb6e2..b5e3cc52b 100644
--- a/openbsd-compat/bsd-cygwin_util.c
+++ b/openbsd-compat/bsd-cygwin_util.c
@@ -29,7 +29,7 @@
29 29
30#include "includes.h" 30#include "includes.h"
31 31
32RCSID("$Id: bsd-cygwin_util.c,v 1.13 2004/08/30 10:42:08 dtucker Exp $"); 32RCSID("$Id: bsd-cygwin_util.c,v 1.14 2005/05/25 09:42:11 dtucker Exp $");
33 33
34#ifdef HAVE_CYGWIN 34#ifdef HAVE_CYGWIN
35 35
@@ -247,6 +247,7 @@ static struct wenv {
247 { NL("COMMONPROGRAMFILES=") }, 247 { NL("COMMONPROGRAMFILES=") },
248 { NL("COMPUTERNAME=") }, 248 { NL("COMPUTERNAME=") },
249 { NL("COMSPEC=") }, 249 { NL("COMSPEC=") },
250 { NL("CYGWIN=") },
250 { NL("NUMBER_OF_PROCESSORS=") }, 251 { NL("NUMBER_OF_PROCESSORS=") },
251 { NL("OS=") }, 252 { NL("OS=") },
252 { NL("PATH=") }, 253 { NL("PATH=") },
@@ -260,7 +261,7 @@ static struct wenv {
260 { NL("SYSTEMROOT=") }, 261 { NL("SYSTEMROOT=") },
261 { NL("TMP=") }, 262 { NL("TMP=") },
262 { NL("TEMP=") }, 263 { NL("TEMP=") },
263 { NL("WINDIR=") }, 264 { NL("WINDIR=") }
264}; 265};
265 266
266char ** 267char **
@@ -269,7 +270,7 @@ fetch_windows_environment(void)
269 char **e, **p; 270 char **e, **p;
270 int i, idx = 0; 271 int i, idx = 0;
271 272
272 p = xmalloc(WENV_SIZ * sizeof(char *)); 273 p = xmalloc((WENV_SIZ + 1) * sizeof(char *));
273 for (e = environ; *e != NULL; ++e) { 274 for (e = environ; *e != NULL; ++e) {
274 for (i = 0; i < WENV_SIZ; ++i) { 275 for (i = 0; i < WENV_SIZ; ++i) {
275 if (!strncmp(*e, wenv_arr[i].name, wenv_arr[i].namelen)) 276 if (!strncmp(*e, wenv_arr[i].name, wenv_arr[i].namelen))