]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl-sock: do not return an uninitialized pointer in ckch_inst_sni_ctx_to_s...
authorWilly Tarreau <w@1wt.eu>
Thu, 5 Mar 2020 15:26:12 +0000 (16:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 5 Mar 2020 15:26:12 +0000 (16:26 +0100)
There's a build error reported here:
   https://github.com/haproxy/haproxy/commit/c9c6cdbf9c0e61ee88d68960a3220a4fcbf912cd/checks?check_suite_id=501365673

It's just caused by an inconditional assignment of tmp_filter to
*sni_filter without having been initialized, though it's harmless because
this return pointer is not used when fcount is NULL, which is the only
case where this happens.

No backport is needed as this was brought today by commit 38df1c8006
("MINOR: ssl/cli: support crt-list filters").

src/ssl_sock.c

index df15b77c192873f58adff6b20cdb79fe0543b27f..eeae7c4f45f045dcbe801866473a4ace079ec326 100644 (file)
@@ -3960,8 +3960,8 @@ static int ckch_inst_sni_ctx_to_sni_filters(const struct ckch_inst *ckchi, char
                memcpy(tmp_filter[i] + sc0->neg + sc0->wild, (char *)sc0->name.key, len + 1);
                i++;
        }
-end:
        *sni_filter = tmp_filter;
+end:
        *fcount = tmp_fcount;
 
        return errcode;