diff options
author | deraadt <> | 2012-09-13 15:39:05 +0000 |
---|---|---|
committer | deraadt <> | 2012-09-13 15:39:05 +0000 |
commit | 4839ce6b30eb9046e22e3e71d26c85a422a7c2ba (patch) | |
tree | cf53fc0594d2cfdfdebbf81e670fb1f173fc4dea /src | |
parent | 8f409243836a1786c7d0e6e453bddef662e8f3c7 (diff) | |
download | openbsd-4839ce6b30eb9046e22e3e71d26c85a422a7c2ba.tar.gz openbsd-4839ce6b30eb9046e22e3e71d26c85a422a7c2ba.tar.bz2 openbsd-4839ce6b30eb9046e22e3e71d26c85a422a7c2ba.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 'src')
-rw-r--r-- | src/lib/libc/stdlib/realpath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/realpath.c b/src/lib/libc/stdlib/realpath.c index 21af4cf005..534f48d4b4 100644 --- a/src/lib/libc/stdlib/realpath.c +++ b/src/lib/libc/stdlib/realpath.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: realpath.c,v 1.14 2011/07/24 21:03:00 miod Exp $ */ | 1 | /* $OpenBSD: realpath.c,v 1.15 2012/09/13 15:39:05 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru> | 3 | * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru> |
4 | * | 4 | * |
@@ -187,7 +187,7 @@ realpath(const char *path, char *resolved) | |||
187 | symlink[slen] = '/'; | 187 | symlink[slen] = '/'; |
188 | symlink[slen + 1] = 0; | 188 | symlink[slen + 1] = 0; |
189 | } | 189 | } |
190 | left_len = strlcat(symlink, left, sizeof(left)); | 190 | left_len = strlcat(symlink, left, sizeof(symlink)); |
191 | if (left_len >= sizeof(left)) { | 191 | if (left_len >= sizeof(left)) { |
192 | errno = ENAMETOOLONG; | 192 | errno = ENAMETOOLONG; |
193 | goto err; | 193 | goto err; |