From 9271a050b5af6594ab112a9c116854953b041d8f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 22 Oct 1998 11:49:29 +0000 Subject: Update. 1998-10-22 H.J. Lu * sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): Add sanity check for n. * sysdeps/unix/sysv/linux/i386/setgroups.c (setgroups): Likewise. * sysdeps/posix/fpathconf.c (__fpathconf): Set errno to EINVAL if errno == ENODEV. Tested by VSX-PCT. * sysdeps/posix/isatty.c (__isatty): Don't reset errno. Tested by VSX-PCT. * posix/execvp.c (execvp): Check "". Tested by VSX-PCT. --- posix/execvp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'posix/execvp.c') diff --git a/posix/execvp.c b/posix/execvp.c index 5b1e14b..7afb01d 100644 --- a/posix/execvp.c +++ b/posix/execvp.c @@ -54,7 +54,7 @@ execute (const char *file, char *const argv[]) /* Execute the shell. */ execv (new_argv[0], new_argv); } - } + } } @@ -67,6 +67,13 @@ execvp (file, argv) { int got_eacces = 0; + if (*file == '\0') + { + /* We check the simple case first. */ + __set_errno (ENOENT); + return -1; + } + if (strchr (file, '/') != NULL) /* Don't search when it contains a slash. */ execute (file, argv); -- cgit v1.1