From caba3dc151d3df2e58c46875aa1f9e38e618a654 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Wed, 7 Jul 2021 08:56:25 -0700 Subject: [PATCH] GH-1644: Pass a larger structure to be calloc'd in patricia.c --- src/patricia.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/patricia.c b/src/patricia.c index e2bf3a61be..842436c006 100644 --- a/src/patricia.c +++ b/src/patricia.c @@ -273,7 +273,7 @@ New_Prefix2 (int family, void *dest, int bitlen, prefix_t *prefix) if (family == AF_INET) { if (prefix == NULL) { #ifndef NT - prefix = calloc(1, sizeof (prefix4_t)); + prefix = calloc(1, sizeof (prefix_t)); if (prefix == NULL) out_of_memory("patricia/new_prefix2: unable to allocate memory"); #else