* libc/rexec.cc (cygwin_rexec): Make ahostbuf static to avoid returning

an out-of-scope address.
This commit is contained in:
Corinna Vinschen 2014-06-17 08:46:59 +00:00
parent 1f4923ae73
commit 451f0f45ee
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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))