--- curl-7.21.3/tests/server/tftpd.c.orig 2010-12-01 18:45:49.000000000 +0000 +++ curl-7.21.3/tests/server/tftpd.c 2010-12-16 13:19:13.489446036 +0000 @@ -1291,8 +1291,8 @@ pe->e_msg = strerror(error - 100); tp->th_code = EUNDEF; /* set 'undef' errorcode */ } - strcpy(tp->th_msg, pe->e_msg); length = (int)strlen(pe->e_msg); + memcpy(tp->th_msg, pe->e_msg, length + 1); tp->th_msg[length] = '\0'; length += 5; if (swrite(peer, &buf.storage[0], length) != length)