From aef8fcd6705f22e210fa0ea7052a069c609d7055 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Thu, 31 Oct 2019 09:43:29 -0500 Subject: [PATCH] Zero memory upon allocation in bibtex. --- tectonic/bibtex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tectonic/bibtex.c b/tectonic/bibtex.c index 96677fc619..7e7f70f4b7 100644 --- a/tectonic/bibtex.c +++ b/tectonic/bibtex.c @@ -9,7 +9,7 @@ #define eof tectonic_eof /* (Re)Allocate N items of type T using xmalloc/xrealloc. */ -#define XTALLOC(n, t) (xmalloc ((n) * sizeof (t))) +#define XTALLOC(n, t) (xcalloc (n, sizeof (t))) #define BIB_XRETALLOC_NOSET(array_name, array_var, type, size_var, new_size) \ (array_var) = (type *) xrealloc((array_var), (new_size + 1) * sizeof(type))