core: check if argc > 0 and argv[0] is set

Follow-up for 1637e75707.
This commit is contained in:
Yu Watanabe
2022-01-30 17:54:55 +09:00
committed by Frantisek Sumsal
parent 1637e75707
commit cf3095ac2b

View File

@@ -2726,6 +2726,8 @@ int main(int argc, char *argv[]) {
Manager *m = NULL;
FDSet *fds = NULL;
assert(argc > 0 && !isempty(argv[0]));
/* SysV compatibility: redirect init → telinit */
redirect_telinit(argc, argv);