summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2013-06-07 10:09:40 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-06-17 18:20:29 +1000
commit156679083e506c8fcea71881bdbc2919a196245a (patch)
tree7dabda0bd3f7045e90c2780b373270feeaabb7b1 /fs
parent08ce23dd3694493c9240ed7d470990a6ff62a7f5 (diff)
coredump: avoid the uninitialized cn->corename if core_pattern is empty
If core_pattern is "" or "|", cn->corename is used uninitialized by filp_open() or call_usermodehelper_exec(). Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Colin Walters <walters@verbum.org> Cc: Denys Vlasenko <vda.linux@googlemail.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Lennart Poettering <mzxreary@0pointer.de> Cc: Lucas De Marchi <lucas.de.marchi@gmail.com> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/coredump.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/coredump.c b/fs/coredump.c
index 5968064ecfa8..72f816d6cad9 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -165,6 +165,7 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm)
cn->corename = NULL;
if (expand_corename(cn, core_name_size))
return -ENOMEM;
+ cn->corename[0] = '\0';
if (ispipe)
++pat_ptr;