- (bal) [realpath.c] Updated with OpenBSD tree.
diff --git a/ChangeLog b/ChangeLog
index 27d77d9..18a764e 100644
--- 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.
@@ -1287,4 +1288,4 @@
- (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 $
diff --git a/openbsd-compat/realpath.c b/openbsd-compat/realpath.c
index b4a05db..b9035ca 100644
--- a/openbsd-compat/realpath.c
+++ b/openbsd-compat/realpath.c
@@ -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 @@
/* 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 @@
* 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;