From owner-svn-src-stable-9@FreeBSD.ORG Sun Jan 1 18:17:37 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC4F3106564A; Sun, 1 Jan 2012 18:17:37 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C66DF8FC0A; Sun, 1 Jan 2012 18:17:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q01IHbh9024265; Sun, 1 Jan 2012 18:17:37 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q01IHbs5024263; Sun, 1 Jan 2012 18:17:37 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201201011817.q01IHbs5024263@svn.freebsd.org> From: Dimitry Andric Date: Sun, 1 Jan 2012 18:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229180 - stable/9/lib/libc/stdlib X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2012 18:17:38 -0000 Author: dim Date: Sun Jan 1 18:17:37 2012 New Revision: 229180 URL: http://svn.freebsd.org/changeset/base/229180 Log: MFC r227090: Fix a warning emitted by Clang. The size passed to strlcat() must depend on the input length, not the output length. Because the input and output buffers are equal in size, the resulting binary does not change at all. Modified: stable/9/lib/libc/stdlib/realpath.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdlib/realpath.c ============================================================================== --- stable/9/lib/libc/stdlib/realpath.c Sun Jan 1 17:47:52 2012 (r229179) +++ stable/9/lib/libc/stdlib/realpath.c Sun Jan 1 18:17:37 2012 (r229180) @@ -212,7 +212,8 @@ realpath(const char * __restrict path, c 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)) { if (m) free(resolved);