summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/realpath.c
diff options
context:
space:
mode:
authorhin <hin@openbsd.org>2003-04-04 22:47:43 +0000
committerhin <hin@openbsd.org>2003-04-04 22:47:43 +0000
commit636abdf3969eff3caadaec9dc4ecdc034a3610a3 (patch)
tree4e504fcdc7b3d8082d827b4733d5aa96fefd9c83 /lib/libc/stdlib/realpath.c
parentstrlcpy; tedu ok (diff)
downloadwireguard-openbsd-636abdf3969eff3caadaec9dc4ecdc034a3610a3.tar.xz
wireguard-openbsd-636abdf3969eff3caadaec9dc4ecdc034a3610a3.zip
strcat -> strlcat
ok deraadt@ tedu@ tdeval@
Diffstat (limited to 'lib/libc/stdlib/realpath.c')
-rw-r--r--lib/libc/stdlib/realpath.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c
index d01b19e0f2e..71063394d19 100644
--- a/lib/libc/stdlib/realpath.c
+++ b/lib/libc/stdlib/realpath.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: realpath.c,v 1.7 2002/05/24 21:22:37 deraadt Exp $";
+static char *rcsid = "$OpenBSD: realpath.c,v 1.8 2003/04/04 22:47:43 hin Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -144,8 +144,8 @@ loop:
goto err1;
}
if (rootd == 0)
- (void)strcat(resolved, "/");
- (void)strcat(resolved, wbuf);
+ strlcat(resolved, "/", MAXPATHLEN);
+ strlcat(resolved, wbuf, MAXPATHLEN);
}
/* Go back to where we came from. */