From 1ea1f26b4127f5eeb75d919f56b3ea2cc40ae283 Mon Sep 17 00:00:00 2001 From: Makoto Kato Date: Wed, 10 Jul 2013 11:02:43 +0900 Subject: [PATCH] We should return after arc4random_buf() --- evutil_rand.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/evutil_rand.c b/evutil_rand.c index 039c74e3..38814e4c 100644 --- a/evutil_rand.c +++ b/evutil_rand.c @@ -67,6 +67,7 @@ ev_arc4random_buf(void *buf, size_t n) { #if defined(EVENT__HAVE_ARC4RANDOM_BUF) && !defined(__APPLE__) arc4random_buf(buf, n); + return; #else unsigned char *b = buf; @@ -79,6 +80,7 @@ ev_arc4random_buf(void *buf, size_t n) */ if (arc4random_buf != NULL) { arc4random_buf(buf, n); + return; } #endif /* Make sure that we start out with b at a 4-byte alignment; plenty -- 2.40.0