1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +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:
Simon Tatham 2003-04-18 09:00:16 +00:00
parent d66a1d685f
commit a9c8e035dd

6
ssh.c
View File

@ -5847,10 +5847,12 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen, int ispkt)
pktsize = ssh2_pkt_getuint32(ssh);
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);
peeraddr[peeraddrlen] = '\0';
ssh2_pkt_getstring(ssh, &peeraddr, &peeraddrlen);
peerport = ssh2_pkt_getuint32(ssh);
if (!ssh->X11_fwd_enabled)