diff options
author | Mike Gilbert <floppym@gentoo.org> | 2021-07-23 15:27:15 -0400 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2021-08-12 15:04:38 -0500 |
commit | dec9ef200b0d7e96993e2725792a9e7abe9c5f1f (patch) | |
tree | 31d08860aff8f858c97e43cd27c6601eb1d2a188 /src | |
parent | 7f47539fb1992fa4f1c9ae7d039d21404d2eae71 (diff) |
openrc-init: ignore an empty string in argv[1]
X-Gentoo-Bug: 803536
X-Gentoo-Bug-URL: https://bugs.gentoo.org/803536
Closes: https://github.com/OpenRC/openrc/pull/431
Diffstat (limited to 'src')
-rw-r--r-- | src/rc/openrc-init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rc/openrc-init.c b/src/rc/openrc-init.c index c27e2086..00423746 100644 --- a/src/rc/openrc-init.c +++ b/src/rc/openrc-init.c @@ -263,7 +263,7 @@ int main(int argc, char **argv) printf("OpenRC init version %s starting\n", VERSION); - if (argc > 1) + if (argc > 1 && argv[1][0] != '\0') default_runlevel = argv[1]; else default_runlevel = NULL; |