mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
Fix obvious foulup in X forwarding: my recent `how did this ever
work' change to port forwarding completely broke it, by failing to set peeraddr{,len} before reading them. Oops. [originally from svn r3127]
This commit is contained in:
parent
d66a1d685f
commit
a9c8e035dd
6
ssh.c
6
ssh.c
@ -5847,10 +5847,12 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen, int ispkt)
|
|||||||
pktsize = ssh2_pkt_getuint32(ssh);
|
pktsize = ssh2_pkt_getuint32(ssh);
|
||||||
|
|
||||||
if (typelen == 3 && !memcmp(type, "x11", 3)) {
|
if (typelen == 3 && !memcmp(type, "x11", 3)) {
|
||||||
char *addrstr = snewn(peeraddrlen+1, char);
|
char *addrstr;
|
||||||
|
|
||||||
|
ssh2_pkt_getstring(ssh, &peeraddr, &peeraddrlen);
|
||||||
|
addrstr = snewn(peeraddrlen+1, char);
|
||||||
memcpy(addrstr, peeraddr, peeraddrlen);
|
memcpy(addrstr, peeraddr, peeraddrlen);
|
||||||
peeraddr[peeraddrlen] = '\0';
|
peeraddr[peeraddrlen] = '\0';
|
||||||
ssh2_pkt_getstring(ssh, &peeraddr, &peeraddrlen);
|
|
||||||
peerport = ssh2_pkt_getuint32(ssh);
|
peerport = ssh2_pkt_getuint32(ssh);
|
||||||
|
|
||||||
if (!ssh->X11_fwd_enabled)
|
if (!ssh->X11_fwd_enabled)
|
||||||
|
Loading…
Reference in New Issue
Block a user