Fix "make test" seg fault with SCTP enabled
authorMatt Caswell <matt@openssl.org>
Tue, 11 Aug 2015 18:38:39 +0000 (19:38 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 11 Aug 2015 21:27:05 +0000 (22:27 +0100)
commit396e30044910df29b81a416de42a94eb4355cd70
treee6de0f3b87d5c2a3d98e711580c4d151279d2955
parent402634f8aaf2f2c83b2cc648a0ae376247b029f4
Fix "make test" seg fault with SCTP enabled

When config'd with "sctp" running "make test" causes a seg fault. This is
actually due to the way ssltest works - it dives under the covers and frees
up BIOs manually and so some BIOs are NULL when the SCTP code does not
expect it. The simplest fix is just to add some sanity checks to make sure
the BIOs aren't NULL before we use them.

This problem occurs in master and 1.0.2. The fix has also been applied to
1.0.1 to keep the code in sync.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit f75d5171be0b3b5419c8974133e1573cf976a8bb)
ssl/d1_both.c