Trivial braino in parsing of the port forwarding config data. Was
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 22 Nov 2003 14:50:57 +0000 (14:50 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 22 Nov 2003 14:50:57 +0000 (14:50 +0000)
causing all port forwardings after the first dynamic one to be
ignored.

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

ssh.c

diff --git a/ssh.c b/ssh.c
index 33da993..d83d0c1 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -3302,6 +3302,7 @@ static void ssh1_protocol(Ssh ssh, unsigned char *in, int inlen, int ispkt)
            } else {
                while (*ssh->portfwd_strptr) ssh->portfwd_strptr++;
                dport = dserv = -1;
+               ssh->portfwd_strptr++; /* eat the NUL and move to next one */
            }
            sport = atoi(sports);
            sserv = 0;
@@ -5418,6 +5419,7 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen, int ispkt)
            } else {
                while (*ssh->portfwd_strptr) ssh->portfwd_strptr++;
                dport = dserv = -1;
+               ssh->portfwd_strptr++; /* eat the NUL and move to next one */
            }
            sport = atoi(sports);
            sserv = 0;