aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/route.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-01-01 16:59:35 -0600
committerRob Landley <rob@landley.net>2015-01-01 16:59:35 -0600
commit82effc97f9f2d1c258ea50cb11b130753b8ba805 (patch)
treef6c584d2b1675a91eb1a016977560ff7148c15a1 /toys/pending/route.c
parent5f53d130b1eae9041cc88c0ffb89e2b5823da393 (diff)
downloadtoybox-82effc97f9f2d1c258ea50cb11b130753b8ba805.tar.gz
Switch a lot of strncpy() calls to xstrncpy().
Diffstat (limited to 'toys/pending/route.c')
-rw-r--r--toys/pending/route.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/pending/route.c b/toys/pending/route.c
index 163ce6b3..ac1bbef5 100644
--- a/toys/pending/route.c
+++ b/toys/pending/route.c
@@ -411,7 +411,7 @@ static void setroute_inet6(char **argv)
if (dev_name) {
char ifre_buf[sizeof(struct ifreq)] = {0,};
struct ifreq *ifre = (struct ifreq*)ifre_buf;
- strncpy(ifre->ifr_name, dev_name, IFNAMSIZ-1);
+ xstrncpy(ifre->ifr_name, dev_name, IFNAMSIZ);
xioctl(sockfd, SIOGIFINDEX, ifre);
rt.rtmsg_ifindex = ifre->ifr_ifindex;
}