(Included in 2.4)
--- trivial-2.5.8/fs/exec.c.orig Mon Apr 22 13:42:32 2002
+++ trivial-2.5.8/fs/exec.c Mon Apr 22 13:42:32 2002
@@ -978,8 +978,7 @@
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(¤t->mm->mm_users) != 1)
sprintf(&corename[4], ".%d", current->pid);
file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600);
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/