]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
check return code of gnutls_rnd().
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 22 Nov 2013 17:28:59 +0000 (18:28 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 22 Nov 2013 17:29:26 +0000 (18:29 +0100)
lib/ext/session_ticket.c

index 57cb33c956483126a7d8dd8a89b4f5dc933ddcf7..af965ee20d120a1dc18852b7ccd0d750ad77bc7b 100644 (file)
@@ -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,