From 054ef7f719ce6fd2167f1c1b4433feaa438bebfc Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 6 Oct 2023 12:37:01 -0400 Subject: alloc: Test allocation size overflows --- src/alloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/alloc.h') diff --git a/src/alloc.h b/src/alloc.h index 5f0c423..fd3e5f0 100644 --- a/src/alloc.h +++ b/src/alloc.h @@ -132,11 +132,11 @@ void *zalloc(size_t align, size_t size); /** Allocate memory for an array. */ #define ALLOC_ARRAY(type, count) \ - (type *)alloc(alignof(type), sizeof_array(type, count)); + (type *)alloc(alignof(type), sizeof_array(type, count)) /** Allocate zeroed memory for an array. */ #define ZALLOC_ARRAY(type, count) \ - (type *)zalloc(alignof(type), sizeof_array(type, count)); + (type *)zalloc(alignof(type), sizeof_array(type, count)) /** Allocate memory for a flexible struct. */ #define ALLOC_FLEX(type, member, count) \ -- cgit v1.2.3