]> sourceware.org Git - newlib-cygwin.git/commitdiff
* libc/posix/execvp.c (execvp): Check path for
authorCorinna Vinschen <corinna@vinschen.de>
Sun, 16 Apr 2000 10:53:02 +0000 (10:53 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Sun, 16 Apr 2000 10:53:02 +0000 (10:53 +0000)
        trailing slash.

newlib/ChangeLog
newlib/libc/posix/execvp.c

index 33b0ef33d8e51e94951f0e3142c82454ed44d52d..0e4030e5e9022079cb22962295c0c07d8507822a 100644 (file)
@@ -1,3 +1,8 @@
+Sun Apr 16 12:45:00 2000  Corinna Vinschen <corinna@vinschen.de>
+
+        * libc/posix/execvp.c (execvp): Check path for
+        trailing slash.
+
 Fri Mar 31 20:39:00 2000  Corinna Vinschen <corinna@vinschen.de>
 
         * libc/include/sys/unistd.h: Add prototypes for
index 6957f61b2e3e3699d7eaa56726f618741a5da8ba..15b2e572cb9ce20f603215c4e36ae59c4157704f 100644 (file)
@@ -73,7 +73,7 @@ _DEFUN (execvp, (file, argv),
     {
       strccpy (buf, path, PATH_DELIM);
       /* An empty entry means the current directory.  */
-      if (*buf != 0)
+      if (*buf != 0 && buf[strlen(buf) - 1] != '/')
        strcat (buf, "/");
       strcat (buf, file);
       if (execv (buf, argv) == -1 && errno != ENOENT)
This page took 0.039003 seconds and 5 git commands to generate.