]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - cmdline.c
If pterm's execvp fails when given the whole argument list after -e,
[PuTTY.git] / cmdline.c
index 9c873503d15913964ff5ab862e837ba6520cfeba..2c3b7ce5caf0715ea62c4ba213999d90b2d0e11b 100644 (file)
--- 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;
-
 }
 
 /*