patch-2.4.19 linux-2.4.19/fs/exec.c

Next file: linux-2.4.19/fs/ext2/inode.c
Previous file: linux-2.4.19/fs/dquot.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/fs/exec.c linux-2.4.19/fs/exec.c
@@ -951,8 +951,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(&current->mm->mm_users) != 1)
  		sprintf(&corename[4], ".%d", current->pid);
 	file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)