mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Trivial port forwarding fixes from Jacob
[originally from svn r1185]
This commit is contained in:
parent
f0d968ce49
commit
24e97a365d
6
ssh.c
6
ssh.c
@ -2459,7 +2459,7 @@ static void ssh1_protocol(unsigned char *in, int inlen, int ispkt)
|
|||||||
pf->dport = dport;
|
pf->dport = dport;
|
||||||
if (add234(ssh_rportfwds, pf) != pf) {
|
if (add234(ssh_rportfwds, pf) != pf) {
|
||||||
sprintf(buf,
|
sprintf(buf,
|
||||||
"Duplicate remote port forwarding to %s:%s",
|
"Duplicate remote port forwarding to %s:%d",
|
||||||
host, dport);
|
host, dport);
|
||||||
logevent(buf);
|
logevent(buf);
|
||||||
sfree(pf);
|
sfree(pf);
|
||||||
@ -2615,7 +2615,7 @@ static void ssh1_protocol(unsigned char *in, int inlen, int ispkt)
|
|||||||
for(h = host, p = pktin.body+8; hostsize != 0; hostsize--) {
|
for(h = host, p = pktin.body+8; hostsize != 0; hostsize--) {
|
||||||
if (h+1 < host+sizeof(host))
|
if (h+1 < host+sizeof(host))
|
||||||
*h++ = *p;
|
*h++ = *p;
|
||||||
*p++;
|
p++;
|
||||||
}
|
}
|
||||||
*h = 0;
|
*h = 0;
|
||||||
port = GET_32BIT(p);
|
port = GET_32BIT(p);
|
||||||
@ -4143,7 +4143,7 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt)
|
|||||||
pf->sport = sport;
|
pf->sport = sport;
|
||||||
if (add234(ssh_rportfwds, pf) != pf) {
|
if (add234(ssh_rportfwds, pf) != pf) {
|
||||||
sprintf(buf,
|
sprintf(buf,
|
||||||
"Duplicate remote port forwarding to %s:%s",
|
"Duplicate remote port forwarding to %s:%d",
|
||||||
host, dport);
|
host, dport);
|
||||||
logevent(buf);
|
logevent(buf);
|
||||||
sfree(pf);
|
sfree(pf);
|
||||||
|
Loading…
Reference in New Issue
Block a user