diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index 35d5cde..eca4ab9 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -12985,7 +12985,7 @@ init(void) /* from var.c: */ { char **envp; - char ppid[sizeof(int)*3 + 1]; + char ppid[sizeof(int)*3 + 2]; const char *p; struct stat st1, st2; @@ -12996,7 +12996,7 @@ init(void) } } - snprintf(ppid, sizeof(ppid), "%u", (unsigned) getppid()); + sprintf(ppid, "%u", (unsigned) getppid()); setvar("PPID", ppid, 0); p = lookupvar("PWD"); |