From d65a926a67749f8e8ffb6df9b3e2e123669b0656 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 14 Aug 2019 11:49:20 +0200 Subject: Filter: Don't alloc varargs array if its length would be zero --- filter/decl.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filter/decl.m4 b/filter/decl.m4 index efecb9a5..14b9329c 100644 --- a/filter/decl.m4 +++ b/filter/decl.m4 @@ -138,7 +138,7 @@ FID_IFCONST([[ } FID_IFCONST([[ const struct f_inst **items = NULL; - if (constargs) { + if (constargs && whati->varcount) { items = alloca(whati->varcount * sizeof(struct f_inst *)); const struct f_inst *child = fvar; for (uint i=0; child; i++) -- cgit v1.2.3