From: Tim Duesterhus Date: Thu, 19 Mar 2020 15:12:10 +0000 (+0100) Subject: BUG/MINOR: ssl: Correctly add the 1 for the sentinel to the number of elements X-Git-Tag: v2.2-dev5~15 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=2445f8d4ec16d7dbd04301c0e37eef9550313ab4;p=haproxy.git BUG/MINOR: ssl: Correctly add the 1 for the sentinel to the number of elements In `crtlist_dup_filters()` add the `1` to the number of elements instead of the size of a single element. This bug was introduced in commit 2954c478ebab019b814b97cbaec4653af7f03f34, which is 2.2+. No backport needed. --- diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 3ff817277..ea513b2f3 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -4656,7 +4656,7 @@ static char **crtlist_dup_filters(char **args, int fcount) char **dst; int i; - dst = calloc(fcount, sizeof(*dst) + 1); + dst = calloc(fcount + 1, sizeof(*dst)); if (!dst) return NULL;