summaryrefslogtreecommitdiff
path: root/schnorr.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-11-08 12:19:55 +1100
committerDamien Miller <djm@mindrot.org>2013-11-08 12:19:55 +1100
commit6c81fee693038de7d4a5559043350391db2a2761 (patch)
treee09e17a18e8556e3b2276b280fa2cd2f2c465f90 /schnorr.c
parent690d989008e18af3603a5e03f1276c9bad090370 (diff)
- djm@cvs.openbsd.org 2013/11/08 00:39:15
[auth-options.c auth2-chall.c authfd.c channels.c cipher-3des1.c] [clientloop.c gss-genr.c monitor_mm.c packet.c schnorr.c umac.c] [sftp-client.c sftp-glob.c] use calloc for all structure allocations; from markus@
Diffstat (limited to 'schnorr.c')
-rw-r--r--schnorr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/schnorr.c b/schnorr.c
index 9549dcf0e..93822fed4 100644
--- a/schnorr.c
+++ b/schnorr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: schnorr.c,v 1.7 2013/05/17 00:13:14 djm Exp $ */ 1/* $OpenBSD: schnorr.c,v 1.8 2013/11/08 00:39:15 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2008 Damien Miller. All rights reserved. 3 * Copyright (c) 2008 Damien Miller. All rights reserved.
4 * 4 *
@@ -549,7 +549,7 @@ modp_group_from_g_and_safe_p(const char *grp_g, const char *grp_p)
549{ 549{
550 struct modp_group *ret; 550 struct modp_group *ret;
551 551
552 ret = xmalloc(sizeof(*ret)); 552 ret = xcalloc(1, sizeof(*ret));
553 ret->p = ret->q = ret->g = NULL; 553 ret->p = ret->q = ret->g = NULL;
554 if (BN_hex2bn(&ret->p, grp_p) == 0 || 554 if (BN_hex2bn(&ret->p, grp_p) == 0 ||
555 BN_hex2bn(&ret->g, grp_g) == 0) 555 BN_hex2bn(&ret->g, grp_g) == 0)