summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/realpath.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2012-09-13 15:39:06 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2012-09-13 15:39:06 +0000
commit662250d57ed7dbee7657f13b9cc252b5190fcfb0 (patch)
treed4c46db88a7466aaa8e9fbdc01716db1d04cd56a /lib/libc/stdlib/realpath.c
parent60e1bbea275e9b34d6dcf930ce2c5b69422ec2ea (diff)
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;