From 74b833977ba41d00145f60ca1b02276ef2309ec6 Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sat, 3 Dec 2022 09:34:32 -0800 Subject: [PATCH] Use calloc in swap_HALF_in_ZVALUE() to help with compiler paranoia --- byteswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/byteswap.c b/byteswap.c index 33811b5..6a5b5ca 100644 --- a/byteswap.c +++ b/byteswap.c @@ -575,7 +575,7 @@ swap_HALF_in_ZVALUE(ZVALUE *dest, ZVALUE *src, BOOL all) /* * allocate the storage */ - dest = malloc(sizeof(ZVALUE)); + dest = calloc(1, sizeof(ZVALUE)); if (dest == NULL) { math_error("swap_HALF_in_ZVALUE: Not enough memory"); not_reached();