From 9108414032c0dfa4a013160b0e083f34ec06781c Mon Sep 17 00:00:00 2001 From: Nathan French Date: Thu, 21 Feb 2019 10:21:02 -0500 Subject: [PATCH] Merge pull request #769 from sungjungk/fix-return-handling Add error-handling routine for arc4_seed() (cherry picked from commit 8d5b14d42888416404a24f8060b514f8258b7f17) --- arc4random.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arc4random.c b/arc4random.c index a2338e69..ea2f3e7c 100644 --- a/arc4random.c +++ b/arc4random.c @@ -379,7 +379,9 @@ arc4_stir(void) rs_initialized = 1; } - arc4_seed(); + if (0 != arc4_seed()) + return -1; + if (!arc4_seeded_ok) return -1; -- 2.40.0