mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Oops. The new remote_cmd_ptr points in the wrong place when you copy a
Config structure like plink does at one point. (I'm almost tempted to say this is where a copy constructor would be handy :-/ ) [originally from svn r1025]
This commit is contained in:
parent
0962190a1b
commit
cfe56ec836
4
plink.c
4
plink.c
@ -423,8 +423,10 @@ int main(int argc, char **argv) {
|
||||
strncpy(cfg.host, p, sizeof(cfg.host)-1);
|
||||
cfg.host[sizeof(cfg.host)-1] = '\0';
|
||||
cfg.port = default_port;
|
||||
} else
|
||||
} else {
|
||||
cfg = cfg2;
|
||||
cfg.remote_cmd_ptr = cfg.remote_cmd;
|
||||
}
|
||||
} else {
|
||||
*r++ = '\0';
|
||||
strncpy(cfg.username, p, sizeof(cfg.username)-1);
|
||||
|
Loading…
Reference in New Issue
Block a user