From 62365d381f94740255bf2806fdaaedfc5fd97a8d Mon Sep 17 00:00:00 2001 From: Bertold Van den Bergh Date: Sun, 25 Aug 2019 15:55:38 +0200 Subject: [PATCH] Correctly cast malloc parameter --- library/Makefile | 1 - library/zonedetect.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/library/Makefile b/library/Makefile index 4f82fca..bf89b16 100644 --- a/library/Makefile +++ b/library/Makefile @@ -24,7 +24,6 @@ #SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -CCARCH?= CC?=$(CCARCH)gcc STRIP?=$(CCARCH)strip diff --git a/library/zonedetect.c b/library/zonedetect.c index 9da6139..d08a73b 100644 --- a/library/zonedetect.c +++ b/library/zonedetect.c @@ -224,7 +224,7 @@ static char *ZDParseString(const ZoneDetect *library, uint32_t *index) } } - char *const str = malloc(strLength + 1); + char *const str = malloc((size_t)(strLength + 1)); if(str) { #if defined(_MSC_VER)