]> asedeno.scripts.mit.edu Git - PuTTY_svn.git/commitdiff
It suddenly strikes me as probably a good idea to enforce that anyone
authorSimon Tatham <anakin@pobox.com>
Fri, 19 Jul 2013 17:44:20 +0000 (17:44 +0000)
committerSimon Tatham <anakin@pobox.com>
Fri, 19 Jul 2013 17:44:20 +0000 (17:44 +0000)
calling random_byte has previously called random_ref.

(I'm not aware of any current code getting this wrong! It just seems
to me to be the sort of thing you'd want to be really sure of.)

git-svn-id: http://svn.tartarus.org/sgt/putty@9930 cda61777-01e9-0310-a592-d414129be87e

sshrand.c

index 4c33f4a01877e488738ebe5297b8beb0302df3d4..85dfa0b6bfbdfe40812d408154759d37044ae0c0 100644 (file)
--- a/sshrand.c
+++ b/sshrand.c
@@ -234,6 +234,8 @@ void random_unref(void)
 
 int random_byte(void)
 {
+    assert(random_active);
+
     if (pool.poolpos >= POOLSIZE)
        random_stir();