summaryrefslogtreecommitdiff
path: root/fs/exec.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2002-04-21 23:10:07 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-04-21 23:10:07 -0700
commit97f642532a88cdf94ec49a38b4fdeb1d9ffc5fa5 (patch)
treed83e7ac6200e3ea1f52b80471f8cf633327f2035 /fs/exec.c
parentd11941268ec59004f94990c074222e9280425699 (diff)
[PATCH] clean up fs_exec.c
Martin Pool <mbp@samba.org>: trivial kernel patch -- clean up fs_exec.c: (Included in 2.4)
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 0bb1bfc81e47..e7e4da3c3a8d 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -978,8 +978,7 @@ int do_coredump(long signr, struct pt_regs * regs)
if (current->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump)
goto fail;
- memcpy(corename,"core.", 5);
- corename[4] = '\0';
+ memcpy(corename,"core", 5); /* include trailing \0 */
if (core_uses_pid || atomic_read(&current->mm->mm_users) != 1)
sprintf(&corename[4], ".%d", current->pid);
file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600);