]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- (bal) [realpath.c] Updated with OpenBSD tree.
authorBen Lindstrom <mouring@eviladmin.org>
Sun, 7 Jul 2002 22:07:10 +0000 (22:07 +0000)
committerBen Lindstrom <mouring@eviladmin.org>
Sun, 7 Jul 2002 22:07:10 +0000 (22:07 +0000)
ChangeLog
openbsd-compat/realpath.c

index 27d77d90d902fcb5225f2914f85f30fb423e68d2..18a764e785457faee68d159d2a3fa72639337d70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
    s/BROKEN_FD_PASSING/DISABLE_FD_PASSING/
  - (tim) [contrib/cygwin/ssh-host-config] sshd account creation fixes
    patch from vinschen@redhat.com
+ - (bal) [realpath.c] Updated with OpenBSD tree.
 
 20020705
  - (tim) [configure.ac] AIX 4.2.1 has authenticate() in libs.
  - (stevesk) entropy.c: typo in debug message
  - (djm) ssh-keygen -i needs seeded RNG; report from markus@
 
-$Id: ChangeLog,v 1.2340 2002/07/07 21:07:46 tim Exp $
+$Id: ChangeLog,v 1.2341 2002/07/07 22:07:10 mouring Exp $
index b4a05db95314ca677a9b35ab4f2a38a02a53536c..b9035ca229fbd2639acfd64e782fa504bf1ede32 100644 (file)
@@ -32,7 +32,7 @@
 #if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH)
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: realpath.c,v 1.6 2002/01/12 16:24:35 millert Exp $";
+static char *rcsid = "$OpenBSD: realpath.c,v 1.7 2002/05/24 21:22:37 deraadt Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/param.h>
@@ -69,7 +69,7 @@ realpath(const char *path, char *resolved)
        /* Save the starting point. */
        getcwd(start,MAXPATHLEN);       
        if ((fd = open(".", O_RDONLY)) < 0) {
-               (void)strcpy(resolved, ".");
+               (void)strlcpy(resolved, ".", MAXPATHLEN);
                return (NULL);
        }
        close(fd);
@@ -129,7 +129,7 @@ loop:
         * Save the last component name and get the full pathname of
         * the current directory.
         */
-       (void)strcpy(wbuf, p);
+       (void)strlcpy(wbuf, p, sizeof wbuf);
        if (getcwd(resolved, MAXPATHLEN) == 0)
                goto err1;