summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/realpath.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2012-09-13 15:39:05 +0000
committerderaadt <deraadt@openbsd.org>2012-09-13 15:39:05 +0000
commita56d40f781801d98163a549a05b9bc93e9d32c39 (patch)
treee157815477e858fff17600e8430d050577237296 /lib/libc/stdlib/realpath.c
parentUpdate to tzcode2012f. Now that tzcode is in git there are no moe (diff)
downloadwireguard-openbsd-a56d40f781801d98163a549a05b9bc93e9d32c39.tar.xz
wireguard-openbsd-a56d40f781801d98163a549a05b9bc93e9d32c39.zip
specify the bounds of the dst to strlcat (both values were static and
equal, but it is more correct) from Michal Mazurek
Diffstat (limited to 'lib/libc/stdlib/realpath.c')
-rw-r--r--lib/libc/stdlib/realpath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c
index 21af4cf005c..534f48d4b4b 100644
--- a/lib/libc/stdlib/realpath.c
+++ b/lib/libc/stdlib/realpath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: realpath.c,v 1.14 2011/07/24 21:03:00 miod Exp $ */
+/* $OpenBSD: realpath.c,v 1.15 2012/09/13 15:39:05 deraadt Exp $ */
/*
* Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru>
*
@@ -187,7 +187,7 @@ realpath(const char *path, char *resolved)
symlink[slen] = '/';
symlink[slen + 1] = 0;
}
- left_len = strlcat(symlink, left, sizeof(left));
+ left_len = strlcat(symlink, left, sizeof(symlink));
if (left_len >= sizeof(left)) {
errno = ENAMETOOLONG;
goto err;