RAND_egd_bytes: No need to check RAND_status on connection error.
authorganesh <ganeshbhambarkar@gmail.com>
Fri, 11 Nov 2016 03:13:13 +0000 (08:43 +0530)
committerRichard Levitte <levitte@openssl.org>
Tue, 24 Jan 2017 13:40:45 +0000 (14:40 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1886)
(cherry picked from commit c2114afc1622ff0113974b3696e557ea8bf7ffb4)

crypto/rand/rand_egd.c

index f77af415c016f47022d3534bd698e113b0440f00..dd58b214981efd3d1d4fbf4e0f537e9da2a69959 100644 (file)
@@ -231,6 +231,8 @@ int RAND_egd_bytes(const char *path, int bytes)
     int num, ret = -1;
 
     num = RAND_query_egd_bytes(path, NULL, bytes);
+    if (num < 0)
+        goto err;
     if (RAND_status() == 1)
         ret = num;
  err: