X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/a3e17bf8e4b527d0aecf32e634e617978fe5aa26..85bc48f6b240fa18c26473ed30264624a1388f46:/cmdline.c diff --git a/cmdline.c b/cmdline.c index 599673f2..2c3b7ce5 100644 --- a/cmdline.c +++ b/cmdline.c @@ -105,15 +105,12 @@ int cmdline_get_passwd_input(prompts_t *p, unsigned char *in, int inlen) { if (tried_once) return 0; - strncpy(p->prompts[0]->result, cmdline_password, - p->prompts[0]->result_len); - p->prompts[0]->result[p->prompts[0]->result_len-1] = '\0'; + prompt_set_result(p->prompts[0], cmdline_password); memset(cmdline_password, 0, strlen(cmdline_password)); sfree(cmdline_password); cmdline_password = NULL; tried_once = 1; return 1; - } /* @@ -457,12 +454,13 @@ int cmdline_process_param(char *p, char *value, int need_save, Conf *conf) } if (!strcmp(p, "-i")) { - Filename fn; + Filename *fn; RETURN(2); UNAVAILABLE_IN(TOOLTYPE_NONNETWORK); SAVEABLE(0); fn = filename_from_str(value); - conf_set_filename(conf, CONF_keyfile, &fn); + conf_set_filename(conf, CONF_keyfile, fn); + filename_free(fn); } if (!strcmp(p, "-4") || !strcmp(p, "-ipv4")) {