From 86ba7399bb9db5a05d3129aa1db0680e8418e491 Mon Sep 17 00:00:00 2001 From: Jacob Nevins Date: Mon, 1 Nov 2004 00:17:31 +0000 Subject: [PATCH] Argh. Failure to make a variable static to get round coroutine 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... [originally from svn r4725] [r4529 == 27193c4bf06711d74789f91589f38977b12415f8] --- ssh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh.c b/ssh.c index 983e148b..d028974c 100644 --- 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,