--- embedtools/src/get1steth.c 2012/07/22 22:46:47 1.3 +++ embedtools/src/get1steth.c 2013/01/18 12:58:14 1.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ - * $Id: get1steth.c,v 1.3 2012/07/22 22:46:47 misho Exp $ + * $Id: get1steth.c,v 1.4 2013/01/18 12:58:14 misho Exp $ * ************************************************************************* The ELWIX and AITNET software is distributed under the following @@ -47,7 +47,7 @@ SUCH DAMAGE. #include "get1steth.h" -char szIface[MAX_STR]; +char szIface[STRSIZ]; int Verbose; extern char compiled[], compiledby[], compilehost[]; @@ -124,7 +124,7 @@ int main(int argc, char **argv) openlog("get1steth", LOG_CONS | LOG_PERROR, LOG_USER); if (argc) { - strlcpy(szIface, *argv, MAX_STR); + strlcpy(szIface, *argv, sizeof szIface); VERB(1) syslog(LOG_NOTICE, "Info:: Get CUSTOM first interface %s\n", szIface); } else { s = socket(PF_INET, SOCK_DGRAM, 0); @@ -149,7 +149,7 @@ int main(int argc, char **argv) } if (IFM_ETHER == IFM_TYPE(ifmr.ifm_current)) { - strlcpy(szIface, ifp->ifa_name, MAX_STR); + strlcpy(szIface, ifp->ifa_name, sizeof szIface); sdl = (struct sockaddr_dl*) ifp->ifa_addr; VERB(2) syslog(LOG_NOTICE, "Info:: Get first interface=%s MAC=%s\n", szIface, ether_ntoa((struct ether_addr*) LLADDR(sdl)));