From owner-svn-src-stable@FreeBSD.ORG Sun Feb 12 14:56:50 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AABF4106564A; Sun, 12 Feb 2012 14:56:50 +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 991548FC1E; Sun, 12 Feb 2012 14:56:50 +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 q1CEuoDP089202; Sun, 12 Feb 2012 14:56:50 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q1CEuoOs089200; Sun, 12 Feb 2012 14:56:50 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201202121456.q1CEuoOs089200@svn.freebsd.org> From: Dimitry Andric Date: Sun, 12 Feb 2012 14:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231562 - stable/7/usr.bin/rpcgen X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2012 14:56:50 -0000 Author: dim Date: Sun Feb 12 14:56:50 2012 New Revision: 231562 URL: http://svn.freebsd.org/changeset/base/231562 Log: MFC r231054: In usr.bin/rpcgen/rpc_main.c, properly check the return value of strlcpy(), in addition to checking that of strlcat(). Modified: stable/7/usr.bin/rpcgen/rpc_main.c Directory Properties: stable/7/usr.bin/rpcgen/ (props changed) Modified: stable/7/usr.bin/rpcgen/rpc_main.c ============================================================================== --- stable/7/usr.bin/rpcgen/rpc_main.c Sun Feb 12 14:56:40 2012 (r231561) +++ stable/7/usr.bin/rpcgen/rpc_main.c Sun Feb 12 14:56:50 2012 (r231562) @@ -1129,9 +1129,11 @@ parseargs(int argc, const char *argv[], if (++i == argc) { return (0); } - (void) strlcpy(pathbuf, argv[i], sizeof(pathbuf)); - if (strlcat(pathbuf, "/cpp", sizeof(pathbuf)) - >= sizeof(pathbuf)) { + if (strlcpy(pathbuf, argv[i], + sizeof(pathbuf)) >= sizeof(pathbuf) + || strlcat(pathbuf, "/cpp", + sizeof(pathbuf)) >= + sizeof(pathbuf)) { warnx("argument too long"); return (0); }