From: Yu Watanabe Date: Sun, 30 Jan 2022 08:54:55 +0000 (+0900) Subject: core: check if argc > 0 and argv[0] is set X-Git-Tag: v251-rc1~422 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cf3095a;p=thirdparty%2Fsystemd.git core: check if argc > 0 and argv[0] is set Follow-up for 1637e757070a61b12b26a2a4ef547330562dc77f. --- diff --git a/src/core/main.c b/src/core/main.c index 57aedb9b93b..fba9a4a8ec3 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -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);