From 4839ce6b30eb9046e22e3e71d26c85a422a7c2ba Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Thu, 13 Sep 2012 15:39:05 +0000 Subject: specify the bounds of the dst to strlcat (both values were static and equal, but it is more correct) from Michal Mazurek --- src/lib/libc/stdlib/realpath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') 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 @@ -/* $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 * @@ -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; -- cgit v1.2.3-55-g6feb