MINOR: ssl: fix build in release mode
Fix potential null pointer dereference. In fact, this case is not
possible, only a mistake in SSL ex-data initialization may cause it :
either connection is set or quic_conn, which allows to retrieve
the bind_conf.
A BUG_ON was already present but this does not cover release build.
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 1aa46d7..572fa76 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -1537,7 +1537,12 @@
else if (qc)
ctx = qc->xprt_ctx;
#endif /* USE_QUIC */
- BUG_ON(!ctx);
+
+ if (!ctx) {
+ /* must never happen */
+ ABORT_NOW();
+ return;
+ }
#ifndef SSL_OP_NO_RENEGOTIATION
/* Please note that BoringSSL defines this macro to zero so don't
@@ -2488,7 +2493,12 @@
else if (qc)
s = qc->li->bind_conf;
#endif /* USE_QUIC */
- BUG_ON(!s);
+
+ if (!s) {
+ /* must never happen */
+ ABORT_NOW();
+ return 0;
+ }
#ifdef USE_QUIC
if (qc) {