diff options
author | Rob Landley <rob@landley.net> | 2015-01-01 16:59:35 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-01-01 16:59:35 -0600 |
commit | 82effc97f9f2d1c258ea50cb11b130753b8ba805 (patch) | |
tree | f6c584d2b1675a91eb1a016977560ff7148c15a1 /toys/pending/route.c | |
parent | 5f53d130b1eae9041cc88c0ffb89e2b5823da393 (diff) | |
download | toybox-82effc97f9f2d1c258ea50cb11b130753b8ba805.tar.gz |
Switch a lot of strncpy() calls to xstrncpy().
Diffstat (limited to 'toys/pending/route.c')
-rw-r--r-- | toys/pending/route.c | 2 |
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; } |