--- embedtools/src/Attic/upd.c 2012/07/22 22:46:48 1.3 +++ embedtools/src/Attic/upd.c 2013/01/18 12:58:14 1.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ - * $Id: upd.c,v 1.3 2012/07/22 22:46:48 misho Exp $ + * $Id: upd.c,v 1.4 2013/01/18 12:58:14 misho Exp $ * ************************************************************************* The ELWIX and AITNET software is distributed under the following @@ -418,7 +418,7 @@ int Daemonize(struct sockaddr_in sin, const char *csTF struct sockaddr_in cli, rcv; struct sigaction sa; u_char buf[TFTP_BUF], *pos; - char szFName[MAX_STR]; + char szFName[STRSIZ]; struct tftphdr *tftp = (struct tftphdr*) buf; struct timeval tv = { TFTP_TIMEOUT, 0 }; @@ -479,7 +479,7 @@ int Daemonize(struct sockaddr_in sin, const char *csTF case WRQ: len -= 2; pos += 2; - strlcpy(szFName, (char*) pos, MAX_STR); + strlcpy(szFName, (char*) pos, sizeof szFName); VERB(5) printf("Info(5):: Get filename %s\n", szFName); len -= strlen((char*) pos) + 1; pos += strlen((char*) pos) + 1; @@ -595,7 +595,7 @@ int Daemonize(struct sockaddr_in sin, const char *csTF case RRQ: len -= 2; pos += 2; - strlcpy(szFName, (char*) pos, MAX_STR); + strlcpy(szFName, (char*) pos, sizeof szFName); VERB(5) printf("Info(5):: Get filename %s\n", szFName); len -= strlen((char*) pos) + 1; pos += strlen((char*) pos) + 1;