summaryrefslogtreecommitdiff
path: root/random
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-11-14 14:14:23 +0100
committerWerner Koch <wk@gnupg.org>2018-11-14 14:15:15 +0100
commitaa686dfc9b563ff79c01d2f8560b88f69c42ecba (patch)
tree2524f761cf5c0291638e12eddeedba0fbabf6840 /random
parent852245390ef7fd8ca9e36010886a4cf42cf710bf (diff)
downloadlibgcrypt-aa686dfc9b563ff79c01d2f8560b88f69c42ecba.tar.gz
random: Initialize variable as requested by valgrind
random/jitterentropy-base.c: Init. -- The variable ec does not need initialization for proper functioning of the analyzer code. However, valgrind complains about the uninitialized variable. Thus, initialize it. Original-repo: https://github.com/smuellerDD/jitterentropy-library.git Original-commit: 9048af7f06fc1488904f54852e0a2f8da45a4745 Original-Author:: Stephan Mueller <smueller@chronox.de> Original-Date: Sun, 15 Jul 2018 19:14:02 +0200 Reported-by: Steve Grubb <sgrubb@redhat.com> Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'random')
-rw-r--r--random/jitterentropy-base.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/random/jitterentropy-base.c b/random/jitterentropy-base.c
index dc907b29..32fdea46 100644
--- a/random/jitterentropy-base.c
+++ b/random/jitterentropy-base.c
@@ -642,6 +642,8 @@ int jent_entropy_init(void)
int count_stuck = 0;
struct rand_data ec;
+ memset(&ec, 0, sizeof(ec));
+
/* We could perform statistical tests here, but the problem is
* that we only have a few loop counts to do testing. These
* loop counts may show some slight skew and we produce