From a710098493d5be41e809705b163ed497c9fbe7a2 Mon Sep 17 00:00:00 2001 From: nopjmp Date: Wed, 3 Sep 2014 19:39:42 -0500 Subject: [PATCH] fixed RAND_bytes return code checking --- tools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools.c b/tools.c index bc96684..9447858 100644 --- a/tools.c +++ b/tools.c @@ -269,7 +269,7 @@ double tglt_get_double_time (void) { } void tglt_secure_random (void *s, int l) { - if (RAND_bytes (s, l) < 0) { + if (RAND_bytes (s, l) <= 0) { /*if (allow_weak_random) { RAND_pseudo_bytes (s, l); } else {*/