diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-08-31 13:18:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-08-31 13:18:13 -0400 |
commit | 69dce0903187abc0a48606884c88588d276086d7 (patch) | |
tree | 5765797fe077f65d00fcef63a389eae8b0a78a41 /src/common/tortls.c | |
parent | 871b711f1016d0394ca1aae84cdfa267d213eb45 (diff) | |
download | tor-69dce0903187abc0a48606884c88588d276086d7.tar.gz tor-69dce0903187abc0a48606884c88588d276086d7.zip |
Do not call tor_tls_server_info_callback(NULL) from tests.
This isn't valid behavior, and it causes a crash when you run
the unit tests at --debug.
I've added an IF_BUG_ONCE() check for this case.
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r-- | src/common/tortls.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index a62efb5575..23889be259 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -1489,6 +1489,10 @@ tor_tls_server_info_callback(const SSL *ssl, int type, int val) tor_tls_t *tls; (void) val; + IF_BUG_ONCE(ssl == NULL) { + return; // LCOV_EXCL_LINE + } + tor_tls_debug_state_callback(ssl, type, val); if (type != SSL_CB_ACCEPT_LOOP) |