Argh. Failure to make a variable static to get round coroutine
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Mon, 1 Nov 2004 00:17:31 +0000 (00:17 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Mon, 1 Nov 2004 00:17:31 +0000 (00:17 +0000)
mechanics means that each SSH-2 remote tunnel will sfree() something
random and thus have a chance of crashing or doing something else
bad, although it won't otherwise affect execution. Introduced in
1.319 [r4529] (some of my improved diagnostics). One day I'll make a
checkin to ssh.c without forgetting about the coroutines...

git-svn-id: svn://svn.tartarus.org/sgt/putty@4725 cda61777-01e9-0310-a592-d414129be87e

ssh.c

diff --git a/ssh.c b/ssh.c
index 983e148..d028974 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -5770,7 +5770,7 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen, int ispkt)
            }
            if (sport && dport) {
                /* Set up a description of the source port. */
-               char *sportdesc = dupprintf("%.*s%.*s%.*s%.*s%d%.*s",
+               static char *sportdesc = dupprintf("%.*s%.*s%.*s%.*s%d%.*s",
                        (int)(*saddr?strlen(saddr):0), *saddr?saddr:NULL,
                        (int)(*saddr?1:0), ":",
                        (int)(sserv ? strlen(sports) : 0), sports,