X Tutup
Skip to content

Commit cf3095a

Browse files
yuwatamrc0mmand
authored andcommitted
core: check if argc > 0 and argv[0] is set
Follow-up for 1637e75.
1 parent 1637e75 commit cf3095a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2726,6 +2726,8 @@ int main(int argc, char *argv[]) {
27262726
Manager *m = NULL;
27272727
FDSet *fds = NULL;
27282728

2729+
assert(argc > 0 && !isempty(argv[0]));
2730+
27292731
/* SysV compatibility: redirect init → telinit */
27302732
redirect_telinit(argc, argv);
27312733

0 commit comments

Comments
 (0)
X Tutup