summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
486c827)
host names in SOCKS 4A, up to 255 characters (which is apparently
the DNS limit anyway).
git-svn-id: svn://svn.tartarus.org/sgt/putty@3080
cda61777-01e9-0310-a592-
d414129be87e
* we can also use them as a buffer and pointer for reading
* data from the SOCKS client.
*/
* we can also use them as a buffer and pointer for reading
* data from the SOCKS client.
*/
int port;
/*
* When doing dynamic port forwarding, we can receive
int port;
/*
* When doing dynamic port forwarding, we can receive
int len;
if (pr->dynamic == 0x4000) {
pr->dynamic = 0x4001;
int len;
if (pr->dynamic == 0x4000) {
pr->dynamic = 0x4001;
+ pr->port = 8; /* reset buffer to overwrite name */
continue;
}
pr->hostname[0] = 0; /* reply version code */
pr->hostname[1] = 90; /* request granted */
sk_write(pr->s, pr->hostname, 8);
continue;
}
pr->hostname[0] = 0; /* reply version code */
pr->hostname[1] = 90; /* request granted */
sk_write(pr->s, pr->hostname, 8);
pr->port = GET_16BIT_MSB_FIRST(pr->hostname+2);
pr->port = GET_16BIT_MSB_FIRST(pr->hostname+2);
- len = strlen(pr->hostname+8);
- memmove(pr->hostname, pr->hostname + 8 + len + 1,
- lenof(pr->hostname) - (8 + len + 1));
+ memmove(pr->hostname, pr->hostname + 8, len);
goto connect;
} else {
/*
goto connect;
} else {
/*