aboutsummaryrefslogtreecommitdiff
path: root/src/helper/ioutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper/ioutil.c')
-rw-r--r--src/helper/ioutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helper/ioutil.c b/src/helper/ioutil.c
index d4f39e2..c103ce1 100644
--- a/src/helper/ioutil.c
+++ b/src/helper/ioutil.c
@@ -403,7 +403,7 @@ static int ioutil_Jim_Command_mac(Jim_Interp *interp, int argc,
{
if (strcmp("eth0", ifr->ifr_name) != 0)
continue;
- strncpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name));
+ strncpy(ifreq.ifr_name, ifr->ifr_name, sizeof(ifreq.ifr_name) - 1);
if (ioctl(SockFD, SIOCGIFHWADDR, &ifreq) < 0) {
close(SockFD);
return JIM_ERR;