]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: entry->ckch_inst not initialized
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 31 Mar 2020 12:31:41 +0000 (14:31 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 31 Mar 2020 12:40:51 +0000 (14:40 +0200)
The head of the list entry->ckch_inst was not initialized when opening a
directory or reading a crt-list.

src/ssl_sock.c

index abbf3947237bf7aadeb5356f79fc2d69c2120bab..adc95da7ceabaceabbeeb0acf0787e5b05d1bbd0 100644 (file)
@@ -4605,6 +4605,7 @@ static int crtlist_load_cert_dir(char *path, struct bind_conf *bind_conf, struct
                        entry->fcount = 0;
                        entry->filters = NULL;
                        entry->ssl_conf = NULL;
+                       LIST_INIT(&entry->ckch_inst);
 
 #if HA_OPENSSL_VERSION_NUMBER >= 0x1000200fL
                        is_bundle = 0;
@@ -4862,6 +4863,7 @@ static int crtlist_parse_file(char *file, struct bind_conf *bind_conf, struct pr
                entry->node.key = ckchs;
                entry->ssl_conf = ssl_conf;
                entry->crtlist = newlist;
+               LIST_INIT(&entry->ckch_inst);
                /* filters */
                entry->filters = crtlist_dup_filters(&args[cur_arg], arg - cur_arg - 1);
                entry->fcount = arg - cur_arg - 1;