]> git.ipfire.org Git - thirdparty/systemd.git/commit
core/main: restore the correct assert about array position
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 25 Mar 2023 10:58:49 +0000 (11:58 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 26 Mar 2023 00:48:14 +0000 (09:48 +0900)
commit14ecfc1cd2e8050214b56cf3588740e20666b3cd
tree671696347b0442345bfb895bcf91e4476fdc2af3
parent6fc0d6b5aca79f593d8b2bfc6c3bea5c928f4877
core/main: restore the correct assert about array position

'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.
src/core/main.c