summaryrefslogtreecommitdiffstats
path: root/auth2-chall.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-03-26 05:19:21 +0200
committerDamien Miller <djm@mindrot.org>2006-03-26 05:19:21 +0200
commit07d86bec5eeaf19fe33dca99c8ebcbe9a77c3938 (patch)
tree098295eee2d7ec7b116b0db3ac4b580713dd5ab0 /auth2-chall.c
parent - djm@cvs.openbsd.org 2006/03/22 21:27:15 (diff)
downloadopenssh-07d86bec5eeaf19fe33dca99c8ebcbe9a77c3938.tar.xz
openssh-07d86bec5eeaf19fe33dca99c8ebcbe9a77c3938.zip
- djm@cvs.openbsd.org 2006/03/25 00:05:41
[auth-bsdauth.c auth-skey.c auth.c auth2-chall.c channels.c] [clientloop.c deattack.c gss-genr.c kex.c key.c misc.c moduli.c] [monitor.c monitor_wrap.c packet.c scard.c sftp-server.c ssh-agent.c] [ssh-keyscan.c ssh.c sshconnect.c sshconnect2.c sshd.c uuencode.c] [xmalloc.c xmalloc.h] introduce xcalloc() and xasprintf() failure-checked allocations functions and use them throughout openssh xcalloc is particularly important because malloc(nmemb * size) is a dangerous idiom (subject to integer overflow) and it is time for it to die feedback and ok deraadt@
Diffstat (limited to 'auth2-chall.c')
-rw-r--r--auth2-chall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/auth2-chall.c b/auth2-chall.c
index 8860a94c5..d54ee2856 100644
--- a/auth2-chall.c
+++ b/auth2-chall.c
@@ -290,7 +290,7 @@ input_userauth_info_response(int type, u_int32_t seq, void *ctxt)
if (nresp > 100)
fatal("input_userauth_info_response: too many replies");
if (nresp > 0) {
- response = xmalloc(nresp * sizeof(char *));
+ response = xcalloc(nresp, sizeof(char *));
for (i = 0; i < nresp; i++)
response[i] = packet_get_string(NULL);
}