diff options
Diffstat (limited to 'auth-skey.c')
-rw-r--r-- | auth-skey.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/auth-skey.c b/auth-skey.c index ce8c1a809..3e6a06db7 100644 --- a/auth-skey.c +++ b/auth-skey.c | |||
@@ -53,15 +53,10 @@ skey_query(void *ctx, char **name, char **infotxt, | |||
53 | *name = xstrdup(""); | 53 | *name = xstrdup(""); |
54 | *infotxt = xstrdup(""); | 54 | *infotxt = xstrdup(""); |
55 | *numprompts = 1; | 55 | *numprompts = 1; |
56 | *prompts = xmalloc(*numprompts * sizeof(char *)); | 56 | *prompts = xcalloc(*numprompts, sizeof(char *)); |
57 | *echo_on = xmalloc(*numprompts * sizeof(u_int)); | 57 | *echo_on = xcalloc(*numprompts, sizeof(u_int)); |
58 | (*echo_on)[0] = 0; | ||
59 | 58 | ||
60 | len = strlen(challenge) + strlen(SKEY_PROMPT) + 1; | 59 | xasprintf(*prompts, "%s%s", challenge, SKEY_PROMPT); |
61 | p = xmalloc(len); | ||
62 | strlcpy(p, challenge, len); | ||
63 | strlcat(p, SKEY_PROMPT, len); | ||
64 | (*prompts)[0] = p; | ||
65 | 60 | ||
66 | return 0; | 61 | return 0; |
67 | } | 62 | } |