From 70613a3778a470b10121ce8979116d9104480182 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sat, 28 Mar 2020 20:11:22 -0400 Subject: [PATCH] Modified line in DBconnect.c to cast csa2_size to type (size_t), as magic crashed when the conSrArea array exceeded the size of a 32-bit int during the antenna rule check. Should be good for another four orders of magnitude. --- VERSION | 2 +- database/DBconnect.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index bc573855..9a0e0780 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.2.204 +8.2.205 diff --git a/database/DBconnect.c b/database/DBconnect.c index f81446bd..cbbda3e8 100644 --- a/database/DBconnect.c +++ b/database/DBconnect.c @@ -948,7 +948,7 @@ dbcConnectFunc(tile, cx) csa2->csa2_size *= 2; - newlist = (conSrArea *)mallocMagic(csa2->csa2_size * sizeof(conSrArea)); + newlist = (conSrArea *)mallocMagic((size_t)(csa2->csa2_size) * sizeof(conSrArea)); memcpy((void *)newlist, (void *)csa2->csa2_list, (size_t)lastsize * sizeof(conSrArea)); freeMagic((char *)csa2->csa2_list);