From: Ondrej Zajicek Date: Thu, 2 Jul 2026 15:21:50 +0000 (+0200) Subject: Filter: Fix zero arg handling X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59f7b7fb6cf2aa0cbe3640db340c2dd37d36bdca;p=thirdparty%2Fbird.git Filter: Fix zero arg handling memcpy() should not have NULL src arg Reported-By: lzx0xf1@gmail.com Target: patch --- diff --git a/filter/filter.c b/filter/filter.c index f17de58c2..1c9b5dbcf 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -170,7 +170,7 @@ interpret(struct filter_state *fs, const struct f_line *line, uint argc, const s /* Set the arguments and top-level variables */ fstk->vcnt = line->vars + line->args; - memcpy(fstk->vstk, argv, sizeof(struct f_val) * line->args); + bmemcpy(fstk->vstk, argv, sizeof(struct f_val) * line->args); memset(fstk->vstk + line->args, 0, sizeof(struct f_val) * line->vars); /* The same as with the value stack. Not resetting the stack completely for performance reasons. */