'pos' is incremented after each assignment. If we use the maximum number
of arguments, we end up with pos==9 after all the assignments, and it
points to where the next value would be assigned. This position must remain
NULL.
The assert I "fixed" was intentionally introduced in
26abdc73a212b90f7c4b71808a1028d2e87ab09f as a bugfix. So my "fix" repeated
the same error that was fixed back then.
command_line[pos++] = exit_code;
}
- assert(pos < ELEMENTSOF(command_line) - 1);
+ assert(pos < ELEMENTSOF(command_line));
/* The watchdog: */