summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/crypto/bn/bn_rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/crypto/bn/bn_rand.c')
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_rand.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libssl/src/crypto/bn/bn_rand.c b/src/lib/libssl/src/crypto/bn/bn_rand.c
index ac5c5eb308..783f6c22f8 100644
--- a/src/lib/libssl/src/crypto/bn/bn_rand.c
+++ b/src/lib/libssl/src/crypto/bn/bn_rand.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_rand.c,v 1.17 2015/02/19 06:10:29 jsing Exp $ */ 1/* $OpenBSD: bn_rand.c,v 1.18 2015/09/10 15:56:25 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -111,6 +111,7 @@
111 111
112#include <stdio.h> 112#include <stdio.h>
113#include <stdlib.h> 113#include <stdlib.h>
114#include <string.h>
114#include <time.h> 115#include <time.h>
115 116
116#include <openssl/err.h> 117#include <openssl/err.h>
@@ -186,7 +187,7 @@ bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
186 187
187err: 188err:
188 if (buf != NULL) { 189 if (buf != NULL) {
189 OPENSSL_cleanse(buf, bytes); 190 explicit_bzero(buf, bytes);
190 free(buf); 191 free(buf);
191 } 192 }
192 bn_check_top(rnd); 193 bn_check_top(rnd);