Date: Sun, 15 Nov 2015 07:10:02 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> 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 Message-ID: <201511150710.tAF7A2El042750@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511150710.tAF7A2El042750>