From 7700eb86e7740ce5ea0180c6c39e11e816f265c4 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Fri, 12 Mar 2004 21:06:20 +0000 Subject: [PATCH] Do what the execve(2) manpage says and enforce what a Strictly Conforming POSIX application should do by disallowing the argv argument to be NULL. PR: kern/33738 Submitted by: Marc Olzheim, Serge van den Boom OK'ed by: nectar --- sys/kern/kern_exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index d4508c68f01..d2f60d73684 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -944,7 +944,8 @@ exec_extract_strings(imgp) imgp->argc++; } while ((argp = (caddr_t)(intptr_t)fuword(argv++))); } - } + } else + return (EFAULT); imgp->endargs = imgp->stringp;