TRIVIAL 2.5.8: clean up fs_exec.c
Subsystems (2)
PATCH 1/1 TRIVIAL 2.5.8: clean up fs_exec.c
Martin Pool <[email protected]>: trivial kernel patch -- clean up fs_exec.c:
(Included in 2.4)
fs/exec.c renamed from fs/exec.c.orig +1 -2
@@ -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.
fs/exec.c line 981
Quoted 3 lines · Rusty Russell
fs/exec.c renamed from fs/exec.c.orig +1
-2-memcpy (corename,"core." ,5 ); - corename[4 ] ='\0' ; +memcpy (corename,"core" ,5 );/* include trailing \0 */
What's wrong with strcpy? gcc3 will even turn it into a memcpy for you. :)
Paul.