mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
do_coredump(): check return from argv_split()
do_coredump() accesses helper_argv[0] without checking helper_argv != NULL. This can happen if page allocation failed. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
26e5438e4b
commit
350eaf791b
1 changed files with 5 additions and 0 deletions
|
@ -1770,6 +1770,11 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
|
|||
|
||||
if (ispipe) {
|
||||
helper_argv = argv_split(GFP_KERNEL, corename+1, &helper_argc);
|
||||
if (!helper_argv) {
|
||||
printk(KERN_WARNING "%s failed to allocate memory\n",
|
||||
__func__);
|
||||
goto fail_unlock;
|
||||
}
|
||||
/* Terminate the string before the first option */
|
||||
delimit = strchr(corename, ' ');
|
||||
if (delimit)
|
||||
|
|
Loading…
Reference in a new issue