Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/libc/rexec.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index de2ed2e5a..a71d5560a 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2014-05-24 David Stacey <drstacey@tiscali.co.uk>
+
+ * libc/rexec.cc (cygwin_rexec): Make ahostbuf static to avoid returning
+ an out-of-scope address.
+
2014-06-16 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::evaluate_events): Call
diff --git a/winsup/cygwin/libc/rexec.cc b/winsup/cygwin/libc/rexec.cc
index d5548bf15..c3074d381 100644
--- a/winsup/cygwin/libc/rexec.cc
+++ b/winsup/cygwin/libc/rexec.cc
@@ -317,7 +317,7 @@ cygwin_rexec (char **ahost, unsigned short rport, char *name, char *pass,
u_short port = 0;
int s, timo = 1, s3;
char c;
- char ahostbuf[INTERNET_MAX_HOST_NAME_LENGTH + 1];
+ static char ahostbuf[INTERNET_MAX_HOST_NAME_LENGTH + 1];
myfault efault;
if (efault.faulted (EFAULT))