summaryrefslogtreecommitdiff
path: root/engines/e_padlock.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-04-04 16:55:12 +0200
committerRichard Levitte <levitte@openssl.org>2016-04-04 17:01:37 +0200
commit6c13488c4e75ef839bc07a3ce428289aef4bd267 (patch)
treece6dbcf55fbeddb814b24a61d5b71cabbc134e0f /engines/e_padlock.c
parent4b8736a22e758c371bc2f8b3534dc0c274acf42c (diff)
downloadopenssl-new-6c13488c4e75ef839bc07a3ce428289aef4bd267.tar.gz
Make sure the rand_byte buffer in padlock engine is cleansed.
Submitted by Michael McConville <mmcco@mykolab.com> Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'engines/e_padlock.c')
-rw-r--r--engines/e_padlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/e_padlock.c b/engines/e_padlock.c
index 96e7483729..f474f50ca7 100644
--- a/engines/e_padlock.c
+++ b/engines/e_padlock.c
@@ -776,7 +776,7 @@ static int padlock_rand_bytes(unsigned char *output, int count)
*output++ = (unsigned char)buf;
count--;
}
- *(volatile unsigned int *)&buf = 0;
+ OPENSSL_cleanse(&buf, sizeof(buf));
return 1;
}