diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | openbsd-compat/realpath.c | 6 |
2 files changed, 5 insertions, 4 deletions
@@ -4,6 +4,7 @@ | |||
4 | s/BROKEN_FD_PASSING/DISABLE_FD_PASSING/ | 4 | s/BROKEN_FD_PASSING/DISABLE_FD_PASSING/ |
5 | - (tim) [contrib/cygwin/ssh-host-config] sshd account creation fixes | 5 | - (tim) [contrib/cygwin/ssh-host-config] sshd account creation fixes |
6 | patch from vinschen@redhat.com | 6 | patch from vinschen@redhat.com |
7 | - (bal) [realpath.c] Updated with OpenBSD tree. | ||
7 | 8 | ||
8 | 20020705 | 9 | 20020705 |
9 | - (tim) [configure.ac] AIX 4.2.1 has authenticate() in libs. | 10 | - (tim) [configure.ac] AIX 4.2.1 has authenticate() in libs. |
@@ -1287,4 +1288,4 @@ | |||
1287 | - (stevesk) entropy.c: typo in debug message | 1288 | - (stevesk) entropy.c: typo in debug message |
1288 | - (djm) ssh-keygen -i needs seeded RNG; report from markus@ | 1289 | - (djm) ssh-keygen -i needs seeded RNG; report from markus@ |
1289 | 1290 | ||
1290 | $Id: ChangeLog,v 1.2340 2002/07/07 21:07:46 tim Exp $ | 1291 | $Id: ChangeLog,v 1.2341 2002/07/07 22:07:10 mouring Exp $ |
diff --git a/openbsd-compat/realpath.c b/openbsd-compat/realpath.c index b4a05db95..b9035ca22 100644 --- a/openbsd-compat/realpath.c +++ b/openbsd-compat/realpath.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH) | 32 | #if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH) |
33 | 33 | ||
34 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) |
35 | static char *rcsid = "$OpenBSD: realpath.c,v 1.6 2002/01/12 16:24:35 millert Exp $"; | 35 | static char *rcsid = "$OpenBSD: realpath.c,v 1.7 2002/05/24 21:22:37 deraadt Exp $"; |
36 | #endif /* LIBC_SCCS and not lint */ | 36 | #endif /* LIBC_SCCS and not lint */ |
37 | 37 | ||
38 | #include <sys/param.h> | 38 | #include <sys/param.h> |
@@ -69,7 +69,7 @@ realpath(const char *path, char *resolved) | |||
69 | /* Save the starting point. */ | 69 | /* Save the starting point. */ |
70 | getcwd(start,MAXPATHLEN); | 70 | getcwd(start,MAXPATHLEN); |
71 | if ((fd = open(".", O_RDONLY)) < 0) { | 71 | if ((fd = open(".", O_RDONLY)) < 0) { |
72 | (void)strcpy(resolved, "."); | 72 | (void)strlcpy(resolved, ".", MAXPATHLEN); |
73 | return (NULL); | 73 | return (NULL); |
74 | } | 74 | } |
75 | close(fd); | 75 | close(fd); |
@@ -129,7 +129,7 @@ loop: | |||
129 | * Save the last component name and get the full pathname of | 129 | * Save the last component name and get the full pathname of |
130 | * the current directory. | 130 | * the current directory. |
131 | */ | 131 | */ |
132 | (void)strcpy(wbuf, p); | 132 | (void)strlcpy(wbuf, p, sizeof wbuf); |
133 | if (getcwd(resolved, MAXPATHLEN) == 0) | 133 | if (getcwd(resolved, MAXPATHLEN) == 0) |
134 | goto err1; | 134 | goto err1; |
135 | 135 | ||