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
1381684daf8800487b48a70cd634f433b1d6366f)
break;
# endif
default:
+ ret = -1;
goto err; /* failure */
}
}
int num, ret = 0;
num = RAND_query_egd_bytes(path, NULL, bytes);
- if (num < 1)
- goto err;
- if (RAND_status() == 1)
+ if (num < 1 || RAND_status() == 1)
ret = num;
err:
return (ret);