1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Fix several bugs that stopped %proxyport from doing anything useful.

[originally from svn r7133]
This commit is contained in:
Jacob Nevins 2007-01-21 23:34:51 +00:00
parent 46a8859541
commit 242aa5585e

View File

@ -1369,7 +1369,7 @@ char *format_telnet_command(SockAddr addr, int port, const Config *cfg)
eo += 4; eo += 4;
} }
else if (strnicmp(cfg->proxy_telnet_command + eo, else if (strnicmp(cfg->proxy_telnet_command + eo,
"proxyhost", 4) == 0) { "proxyhost", 9) == 0) {
int phlen = strlen(cfg->proxy_host); int phlen = strlen(cfg->proxy_host);
ENSURE(phlen); ENSURE(phlen);
memcpy(ret+retlen, cfg->proxy_host, phlen); memcpy(ret+retlen, cfg->proxy_host, phlen);
@ -1377,11 +1377,11 @@ char *format_telnet_command(SockAddr addr, int port, const Config *cfg)
eo += 9; eo += 9;
} }
else if (strnicmp(cfg->proxy_telnet_command + eo, else if (strnicmp(cfg->proxy_telnet_command + eo,
"proxyport", 4) == 0) { "proxyport", 9) == 0) {
char pport[50]; char pport[50];
int pplen; int pplen;
sprintf(pport, "%d", cfg->proxy_port); sprintf(pport, "%d", cfg->proxy_port);
pplen = strlen(cfg->proxy_host); pplen = strlen(pport);
ENSURE(pplen); ENSURE(pplen);
memcpy(ret+retlen, pport, pplen); memcpy(ret+retlen, pport, pplen);
retlen += pplen; retlen += pplen;