unsigned len = portp - host;
if (len >= sizeof(cfg->ssh_nc_host))
len = sizeof(cfg->ssh_nc_host) - 1;
- strncpy(cfg->ssh_nc_host, value, len);
- cfg->ssh_nc_host[sizeof(cfg->ssh_nc_host) - 1] = '\0';
+ memcpy(cfg->ssh_nc_host, value, len);
+ cfg->ssh_nc_host[len] = '\0';
cfg->ssh_nc_port = atoi(portp+1);
} else {
cmdline_error("-nc expects argument of form 'host:port'");
if (!strcmp(p, "-t")) {
RETURN(1);
UNAVAILABLE_IN(TOOLTYPE_FILETRANSFER | TOOLTYPE_NONNETWORK);
- SAVEABLE(0);
+ SAVEABLE(1); /* lower priority than -m */
cfg->nopty = 0;
}
if (!strcmp(p, "-T")) {
RETURN(1);
UNAVAILABLE_IN(TOOLTYPE_FILETRANSFER | TOOLTYPE_NONNETWORK);
- SAVEABLE(0);
+ SAVEABLE(1);
cfg->nopty = 1;
}