GH-1644: Pass a larger structure to be calloc'd in patricia.c

This commit is contained in:
Tim Wojtulewicz 2021-07-07 08:56:25 -07:00
parent fcee137b1a
commit caba3dc151

View file

@ -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