Coverity doesn't see that the fixed arguments aways have variadic set,
so thought the loop would walk beyond the end of the argument list.
if (xlat && xlat->args) {
arg_start = arg = xlat->args; /* Track the arguments as we parse */
} else {
- static xlat_arg_parser_t default_arg = { .variadic = XLAT_ARG_VARIADIC_EMPTY_SQUASH };
- arg_start = arg = &default_arg;
+ static xlat_arg_parser_t const default_arg[] = { { .variadic = XLAT_ARG_VARIADIC_EMPTY_SQUASH },
+ XLAT_ARG_PARSER_TERMINATOR };
+ arg_start = arg = &default_arg[0];
}
MEM(head = xlat_exp_head_alloc(ctx));