From owner-svn-src-stable@freebsd.org Sun Nov 15 07:10:03 2015 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF26AA2F3F9; Sun, 15 Nov 2015 07:10:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9834C13F0; Sun, 15 Nov 2015 07:10:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAF7A2kV042751; Sun, 15 Nov 2015 07:10:02 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAF7A2El042750; Sun, 15 Nov 2015 07:10:02 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201511150710.tAF7A2El042750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sun, 15 Nov 2015 07:10:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290853 - stable/10/usr.sbin/rtadvd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 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, 15 Nov 2015 07:10:03 -0000 Author: delphij Date: Sun Nov 15 07:10:02 2015 New Revision: 290853 URL: https://svnweb.freebsd.org/changeset/base/290853 Log: MFC r290173: Use strlcpy(). Modified: stable/10/usr.sbin/rtadvd/if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rtadvd/if.c ============================================================================== --- stable/10/usr.sbin/rtadvd/if.c Sun Nov 15 06:38:38 2015 (r290852) +++ stable/10/usr.sbin/rtadvd/if.c Sun Nov 15 07:10:02 2015 (r290853) @@ -359,8 +359,7 @@ update_persist_ifinfo(struct ifilist_hea ELM_MALLOC(ifi, exit(1)); ifi->ifi_ifindex = 0; - strncpy(ifi->ifi_ifname, ifname, sizeof(ifi->ifi_ifname)-1); - ifi->ifi_ifname[sizeof(ifi->ifi_ifname)-1] = '\0'; + strlcpy(ifi->ifi_ifname, ifname, sizeof(ifi->ifi_ifname)); ifi->ifi_rainfo = NULL; ifi->ifi_state = IFI_STATE_UNCONFIGURED; TAILQ_INSERT_TAIL(ifi_head, ifi, ifi_next);