From: Nikos Mavrogiannopoulos Date: Fri, 22 Nov 2013 17:28:59 +0000 (+0100) Subject: check return code of gnutls_rnd(). X-Git-Tag: gnutls_3_3_0pre0~559 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9e8f30bc0d2f2a8a20ef3bd93af1220e0b176a57;p=thirdparty%2Fgnutls.git check return code of gnutls_rnd(). --- diff --git a/lib/ext/session_ticket.c b/lib/ext/session_ticket.c index 57cb33c956..af965ee20d 100644 --- a/lib/ext/session_ticket.c +++ b/lib/ext/session_ticket.c @@ -187,7 +187,11 @@ encrypt_ticket(gnutls_session_t session, session_ticket_ext_st * priv, t = gnutls_time(0); memcpy(iv, &t, 4); - _gnutls_rnd(GNUTLS_RND_NONCE, iv+4, IV_SIZE-4); + ret = _gnutls_rnd(GNUTLS_RND_NONCE, iv+4, IV_SIZE-4); + if (ret < 0) { + gnutls_assert(); + goto cleanup; + } ret = _gnutls_cipher_init(&cipher_hd,