Handle the unlikely event that BIO_get_mem_data() returns -ve.
[openssl.git] / ssl / s3_clnt.c
index 5cea73ca1abcbedaf7c06d5482d1e7dd66af734c..af97a7e1382a0fb7226278fcf6b4a1b27f8e33d0 100644 (file)
@@ -871,7 +871,8 @@ int ssl3_get_server_hello(SSL *s)
                        }
                }
        s->s3->tmp.new_cipher=c;
-       ssl3_digest_cached_records(s);
+       if (!ssl3_digest_cached_records(s))
+               goto f_err;
 
        /* lets get the compression algorithm */
        /* COMPRESSION */