5279e52a34effa491e5e53aa193964482944ca95
[openwrt-packages.git] /
1 commit d332b12b262ad7df1c8bdda52dad100f40399d24
2 Author: Willy Tarreau <w@1wt.eu>
3 Date:   Mon Oct 15 11:01:59 2018 +0200
4
5     BUILD: ssl: fix null-deref warning in ssl_fc_cipherlist_str sample fetch
6     
7     Gcc 6.4 detects a potential null-deref warning in smp_fetch_ssl_fc_cl_str().
8     This one is not real since already addressed a few lines above. Let's use
9     __objt_conn() instead of objt_conn() to avoid the extra test that confuses
10     it.
11     
12     This could be backported to 1.8.
13     
14     (cherry picked from commit b729077710b14c75936909409e27a4fa0badcb54)
15     Signed-off-by: Willy Tarreau <w@1wt.eu>
16
17 diff --git a/src/ssl_sock.c b/src/ssl_sock.c
18 index 6eed8022..4577fef4 100644
19 --- a/src/ssl_sock.c
20 +++ b/src/ssl_sock.c
21 @@ -6929,7 +6929,7 @@ smp_fetch_ssl_fc_cl_str(const struct arg *args, struct sample *smp, const char *
22  #if defined(OPENSSL_IS_BORINGSSL)
23                 cipher = SSL_get_cipher_by_value(id);
24  #else
25 -               struct connection *conn = objt_conn(smp->sess->origin);
26 +               struct connection *conn = __objt_conn(smp->sess->origin);
27                 cipher = SSL_CIPHER_find(conn->xprt_ctx, bin);
28  #endif
29                 str = SSL_CIPHER_get_name(cipher);
git clone https://git.99rst.org/PROJECT