Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2022-08-31 22:18:08 +0300
committerJeff Johnston <jjohnstn@redhat.com>2022-08-31 22:18:08 +0300
commitd92d3a3c4a7af1ebe56d58c32986ab410f6071ec (patch)
treedc9d1165c287da28953546cdad9184e5828d14ab /newlib/libc/stdlib
parentdd1122e21cb4ea78ce4c5894787c8f085469f9dd (diff)
Fix some Coverity Scan errors.
Diffstat (limited to 'newlib/libc/stdlib')
-rw-r--r--newlib/libc/stdlib/arc4random.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/newlib/libc/stdlib/arc4random.c b/newlib/libc/stdlib/arc4random.c
index 5860d644a..7bd9e7c5e 100644
--- a/newlib/libc/stdlib/arc4random.c
+++ b/newlib/libc/stdlib/arc4random.c
@@ -86,6 +86,8 @@ _rs_stir(void)
{
u_char rnd[KEYSZ + IVSZ];
+ memset(rnd, 0, (KEYSZ + IVSZ) * sizeof(u_char));
+
if (getentropy(rnd, sizeof rnd) == -1)
_getentropy_fail();