diff options
-rw-r--r-- | init.c | 3 | ||||
-rw-r--r-- | init/init.c | 3 |
2 files changed, 4 insertions, 2 deletions
@@ -1015,7 +1015,8 @@ extern int init_main(int argc, char **argv) } /* Fix up argv[0] to be certain we claim to be init */ - strncpy(argv[0], "init", strlen(argv[0])+1); + argv[0]="init"; + if (argc > 1) strncpy(argv[1], "\0", strlen(argv[1])+1); diff --git a/init/init.c b/init/init.c index 8d2d1b2..2c23e60 100644 --- a/init/init.c +++ b/init/init.c @@ -1015,7 +1015,8 @@ extern int init_main(int argc, char **argv) } /* Fix up argv[0] to be certain we claim to be init */ - strncpy(argv[0], "init", strlen(argv[0])+1); + argv[0]="init"; + if (argc > 1) strncpy(argv[1], "\0", strlen(argv[1])+1); |