aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssh/moduli.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2006-09-30 13:29:51 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2006-09-30 13:29:51 +0000
commit761efaa70c2ed8d35722b7bc234a46bf2457f876 (patch)
treebba6f2fe7855d7b0095f9dc7720dc27bea4d1fdf /crypto/openssh/moduli.c
parent30c2033ae748d441213eed2e5c3fae760cc8ea61 (diff)
downloadsrc-761efaa70c2ed8d35722b7bc234a46bf2457f876.tar.gz
src-761efaa70c2ed8d35722b7bc234a46bf2457f876.zip
Vendor import of OpenSSH 4.4p1.
Notes
Notes: svn path=/vendor-crypto/openssh/dist/; revision=162852
Diffstat (limited to 'crypto/openssh/moduli.c')
-rw-r--r--crypto/openssh/moduli.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/crypto/openssh/moduli.c b/crypto/openssh/moduli.c
index d53806ea6bda..e18929badd85 100644
--- a/crypto/openssh/moduli.c
+++ b/crypto/openssh/moduli.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: moduli.c,v 1.12 2005/07/17 07:17:55 djm Exp $ */
+/* $OpenBSD: moduli.c,v 1.18 2006/08/03 03:34:42 deraadt Exp $ */
/*
* Copyright 1994 Phil Karn <karn@qualcomm.com>
* Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
@@ -38,11 +38,20 @@
*/
#include "includes.h"
-#include "xmalloc.h"
-#include "log.h"
+
+#include <sys/types.h>
#include <openssl/bn.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <time.h>
+
+#include "xmalloc.h"
+#include "log.h"
+
/*
* File output defines
*/
@@ -301,21 +310,10 @@ gen_candidates(FILE *out, u_int32_t memory, u_int32_t power, BIGNUM *start)
largewords = (largememory << SHIFT_MEGAWORD);
}
- TinySieve = calloc(tinywords, sizeof(u_int32_t));
- if (TinySieve == NULL) {
- error("Insufficient memory for tiny sieve: need %u bytes",
- tinywords << SHIFT_BYTE);
- exit(1);
- }
+ TinySieve = xcalloc(tinywords, sizeof(u_int32_t));
tinybits = tinywords << SHIFT_WORD;
- SmallSieve = calloc(smallwords, sizeof(u_int32_t));
- if (SmallSieve == NULL) {
- error("Insufficient memory for small sieve: need %u bytes",
- smallwords << SHIFT_BYTE);
- xfree(TinySieve);
- exit(1);
- }
+ SmallSieve = xcalloc(smallwords, sizeof(u_int32_t));
smallbits = smallwords << SHIFT_WORD;
/*