From 2445f8d4ec16d7dbd04301c0e37eef9550313ab4 Mon Sep 17 00:00:00 2001 From: Tim Duesterhus Date: Thu, 19 Mar 2020 16:12:10 +0100 Subject: [PATCH] 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. --- src/ssl_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 3ff8172..ea513b2 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; -- 1.7.10.4