summaryrefslogtreecommitdiffstats
path: root/apps/s_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/s_server.c')
-rw-r--r--apps/s_server.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index a8491acfdd..083cc4c553 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -3281,7 +3281,8 @@ static int generate_session_id(const SSL *ssl, unsigned char *id,
{
unsigned int count = 0;
do {
- RAND_pseudo_bytes(id, *id_len);
+ if(RAND_pseudo_bytes(id, *id_len) < 0)
+ return 0;
/*
* Prefix the session_id with the required prefix. NB: If our prefix
* is too long, clip it - but there will be worse effects anyway, eg.