Fix assertion failure in SSL_set_bio()
authorMatt Caswell <matt@openssl.org>
Mon, 16 Apr 2018 13:06:56 +0000 (14:06 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 17 Apr 2018 16:06:46 +0000 (17:06 +0100)
If SSL_set_bio() is called with a NULL wbio after a failed connection then
this can trigger an assertion failure. This should be valid behaviour and
the assertion is in fact invalid and can simply be removed.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5966)

(cherry picked from commit bd7775e14a19c326d3720f2345c2ae324409e979)

ssl/ssl_lib.c

index 8a190d23e8075a1cdb69b2bead471ab15bb8871a..a1a514fcf21bc6e41d4961d4d2e3e39eee1d514c 100644 (file)
@@ -3519,7 +3519,6 @@ void ssl_free_wbio_buffer(SSL *s)
         return;
 
     s->wbio = BIO_pop(s->wbio);
-    assert(s->wbio != NULL);
     BIO_free(s->bbio);
     s->bbio = NULL;
 }