From: Makoto Kato Date: Wed, 10 Jul 2013 02:02:43 +0000 (+0900) Subject: We should return after arc4random_buf() X-Git-Tag: release-2.1.4-alpha~112^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ea1f26b4127f5eeb75d919f56b3ea2cc40ae283;p=libevent We should return after arc4random_buf() --- 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