]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: fix null-deref warning in ssl_fc_cipherlist_str sample fetch
authorWilly Tarreau <w@1wt.eu>
Mon, 15 Oct 2018 09:01:59 +0000 (11:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 15 Oct 2018 11:24:43 +0000 (13:24 +0200)
Gcc 6.4 detects a potential null-deref warning in smp_fetch_ssl_fc_cl_str().
This one is not real since already addressed a few lines above. Let's use
__objt_conn() instead of objt_conn() to avoid the extra test that confuses
it.

This could be backported to 1.8.

src/ssl_sock.c

index b78dc871b436e18ef758a3cb247dae2402332755..baedc33c48313dd78c89ab326cdb26e834ea7bfe 100644 (file)
@@ -7069,7 +7069,7 @@ smp_fetch_ssl_fc_cl_str(const struct arg *args, struct sample *smp, const char *
 #if defined(OPENSSL_IS_BORINGSSL)
                cipher = SSL_get_cipher_by_value(id);
 #else
-               struct connection *conn = objt_conn(smp->sess->origin);
+               struct connection *conn = __objt_conn(smp->sess->origin);
                cipher = SSL_CIPHER_find(conn->xprt_ctx, bin);
 #endif
                str = SSL_CIPHER_get_name(cipher);