Deleted Added
full compact
0a1
> /* $OpenBSD: auth-skey.c,v 1.26 2006/08/05 08:28:24 dtucker Exp $ */
23a25
>
25,26c27
< RCSID("$OpenBSD: auth-skey.c,v 1.20 2002/06/30 21:59:45 deraadt Exp $");
< RCSID("$FreeBSD: head/crypto/openssh/auth-skey.c 149753 2005-09-03 07:04:25Z des $");
---
> __RCSID("$FreeBSD: head/crypto/openssh/auth-skey.c 162856 2006-09-30 13:38:06Z des $");
29a31,35
> #include <sys/types.h>
>
> #include <pwd.h>
> #include <stdio.h>
>
40a47,48
> #include "key.h"
> #include "hostfile.h"
41a50
> #include "ssh-gss.h"
55,56c64
< char challenge[1024], *p;
< int len;
---
> char challenge[1024];
66,68c74,75
< *prompts = xmalloc(*numprompts * sizeof(char *));
< *echo_on = xmalloc(*numprompts * sizeof(u_int));
< (*echo_on)[0] = 0;
---
> *prompts = xcalloc(*numprompts, sizeof(char *));
> *echo_on = xcalloc(*numprompts, sizeof(u_int));
70,74c77
< len = strlen(challenge) + strlen(SKEY_PROMPT) + 1;
< p = xmalloc(len);
< strlcpy(p, challenge, len);
< strlcat(p, SKEY_PROMPT, len);
< (*prompts)[0] = p;
---
> xasprintf(*prompts, "%s%s", challenge, SKEY_PROMPT);