From: Maria Matejka Date: Wed, 14 Aug 2019 09:49:20 +0000 (+0200) Subject: Filter: Don't alloc varargs array if its length would be zero X-Git-Tag: v2.0.8~77^2~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d65a926a67749f8e8ffb6df9b3e2e123669b0656;p=thirdparty%2Fbird.git Filter: Don't alloc varargs array if its length would be zero --- diff --git a/filter/decl.m4 b/filter/decl.m4 index efecb9a57..14b9329c9 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++)