blob: 6b4789fc704f715f26f65ff291047b0010fccfe8 [file] [log] [blame]
Brad Bishop96ff1982019-08-19 13:50:42 -04001From 711a161f03ef9ed7cd149a22bf1203700c103e96 Mon Sep 17 00:00:00 2001
2From: Pauli <paul.dale@oracle.com>
3Date: Fri, 29 Mar 2019 09:24:07 +1000
4Subject: [PATCH] Fix broken change from b3d113e.
5
6Reviewed-by: Tim Hudson <tjh@openssl.org>
7(Merged from https://github.com/openssl/openssl/pull/8606)
8
9Running valgrind against code using Openssl v1.1.1c reports a large number of
10uninitialized memory errors. This fix from upstream solves this problem.
11
12Upstream-Status: Backport [https://github.com/openssl/openssl/commit/711a161f03ef9ed7cd149a22bf1203700c103e96]
13Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
14---
15 crypto/rand/rand_lib.c | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
17
18diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
19index 23abbde156..a298b7515b 100644
20--- a/crypto/rand/rand_lib.c
21+++ b/crypto/rand/rand_lib.c
22@@ -235,8 +235,9 @@ size_t rand_drbg_get_nonce(RAND_DRBG *drbg,
23 struct {
24 void * instance;
25 int count;
26- } data = { NULL, 0 };
27+ } data;
28
29+ memset(&data, 0, sizeof(data));
30 pool = rand_pool_new(0, min_len, max_len);
31 if (pool == NULL)
32 return 0;
33--
342.20.1
35