diff options
author | Ben Laurie <ben@openssl.org> | 2004-05-15 16:39:23 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2004-05-15 16:39:23 +0000 |
commit | 01636025732b3dd63c5ea750e2688722303165b8 (patch) | |
tree | e692e0985d2b98f3c7529bd05a34aebfba29d7b8 /ssl/ssl_sess.c | |
parent | bac2e26a9e742e9d975bbc2a4c1a1f95672ba25e (diff) |
Check error returns.
Diffstat (limited to 'ssl/ssl_sess.c')
-rw-r--r-- | ssl/ssl_sess.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index 7016c87d3b..8e896870c1 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -141,7 +141,8 @@ static int def_generate_session_id(const SSL *ssl, unsigned char *id, { unsigned int retry = 0; do - RAND_pseudo_bytes(id, *id_len); + if(RAND_pseudo_bytes(id, *id_len) <= 0) + return 0; while(SSL_has_matching_session_id(ssl, id, *id_len) && (++retry < MAX_SESS_ID_ATTEMPTS)); if(retry < MAX_SESS_ID_ATTEMPTS) |