From f2d567f0187c842a486c307d6efe3d99506aebb3 Mon Sep 17 00:00:00 2001 From: Brad House Date: Mon, 11 Dec 2023 06:46:11 -0500 Subject: [PATCH] Coverity: fix allocation size as reported in new code --- src/lib/ares__iface_ips.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/ares__iface_ips.c b/src/lib/ares__iface_ips.c index 91210af6..e10a0d80 100644 --- a/src/lib/ares__iface_ips.c +++ b/src/lib/ares__iface_ips.c @@ -201,8 +201,9 @@ static ares_status_t size_t alloc_size; alloc_size = ares__round_up_pow2(ips->alloc_size + 1); - temp = ares_realloc_zero(ips->ips, ips->alloc_size * sizeof(ips->ips), - alloc_size * sizeof(ips->ips)); + temp = ares_realloc_zero(ips->ips, + ips->alloc_size * sizeof(*ips->ips), + alloc_size * sizeof(*ips->ips)); if (temp == NULL) { return ARES_ENOMEM; }