From edd9cc0e677b35498e974d9a4137feac5bd4b323 Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Tue, 26 Mar 2013 18:30:58 +0800 Subject: [PATCH] Clear the space for the certificate list Make sure the aligned bytes are '\0' Signed-off-by: Gary Ching-Pang Lin --- src/wincert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wincert.c b/src/wincert.c index 942fa26..5e23b04 100644 --- a/src/wincert.c +++ b/src/wincert.c @@ -37,7 +37,7 @@ generate_cert_list(SECItem **signatures, int num_signatures, cl_size += ALIGNMENT_PADDING(cl_size, 8); } - uint8_t *data = malloc(cl_size); + uint8_t *data = calloc(1, cl_size); if (!data) return -1; -- 1.8.1.4