Hi,

if timeout_initialized() returns 0, enqueue_randomness() may use 'ts'
uninitialized.  This is not really a problem because the value is
blended with other collected entropy.  To make things clearer
I would still prefer to always initialize 'ts'.

ok?

Index: rnd.c
===================================================================
RCS file: /cvs/src/sys/dev/rnd.c,v
retrieving revision 1.203
diff -u -p -r1.203 rnd.c
--- rnd.c       2 Mar 2020 22:27:50 -0000       1.203
+++ rnd.c       6 Mar 2020 14:57:20 -0000
@@ -296,7 +296,7 @@ void
 enqueue_randomness(u_int val)
 {
        struct rand_event *rep;
-       struct timespec ts;
+       struct timespec ts = { 0, 0 };
        u_int qlen;
 
        if (timeout_initialized(&rnd_timeout))

Reply via email to