BUG/MINOR: ssl/cli: initialize fcount int crtlist_entry
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 2 Apr 2020 10:02:54 +0000 (12:02 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Thu, 2 Apr 2020 13:40:19 +0000 (15:40 +0200)
Initialize fcount to 0 when 'add ssl crt-list' does not contain any
filters. This bug can lead to trying to read some filters even if they
doesn't exist.

src/ssl_sock.c

index 7be6d1c..bf6205f 100644 (file)
@@ -11400,6 +11400,7 @@ static int cli_parse_add_crtlist(char **args, char *payload, struct appctx *appc
                memprintf(&err, "Not enough memory!");
                goto error;
        }
+       entry->fcount = 0;
        entry->filters = NULL;
        entry->ssl_conf = NULL;