]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
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 7be6d1ccf9d7543245fc7ccf7dbf1a6a2d58533d..bf6205fb29f9a90064d2597c131e459ab13ef56d 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;