summaryrefslogtreecommitdiff
path: root/scard.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-03-26 14:19:21 +1100
committerDamien Miller <djm@mindrot.org>2006-03-26 14:19:21 +1100
commit07d86bec5eeaf19fe33dca99c8ebcbe9a77c3938 (patch)
tree098295eee2d7ec7b116b0db3ac4b580713dd5ab0 /scard.c
parent7cd4579eb3c5afd22ae24436fd2611cd3aa0150a (diff)
- 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 'scard.c')
-rw-r--r--scard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scard.c b/scard.c
index 7cffc2d4e..c0c22aa73 100644
--- a/scard.c
+++ b/scard.c
@@ -382,7 +382,7 @@ sc_get_keys(const char *id, const char *pin)
382 key_free(k); 382 key_free(k);
383 return NULL; 383 return NULL;
384 } 384 }
385 keys = xmalloc((nkeys+1) * sizeof(Key *)); 385 keys = xcalloc((nkeys+1), sizeof(Key *));
386 386
387 n = key_new(KEY_RSA1); 387 n = key_new(KEY_RSA1);
388 BN_copy(n->rsa->n, k->rsa->n); 388 BN_copy(n->rsa->n, k->rsa->n);