=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/complete.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- src/usr.bin/ftp/complete.c 2003/04/05 17:19:47 1.14 +++ src/usr.bin/ftp/complete.c 2004/07/09 17:11:22 1.15 @@ -1,4 +1,4 @@ -/* $OpenBSD: complete.c,v 1.14 2003/04/05 17:19:47 deraadt Exp $ */ +/* $OpenBSD: complete.c,v 1.15 2004/07/09 17:11:22 millert Exp $ */ /* $NetBSD: complete.c,v 1.10 1997/08/18 10:20:18 lukem Exp $ */ /*- @@ -39,7 +39,7 @@ #ifndef SMALL #ifndef lint -static char rcsid[] = "$OpenBSD: complete.c,v 1.14 2003/04/05 17:19:47 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: complete.c,v 1.15 2004/07/09 17:11:22 millert Exp $"; #endif /* not lint */ /* @@ -314,7 +314,8 @@ len = lf->lastchar - lf->buffer; if (len >= sizeof(line)) return (CC_ERROR); - (void)strlcpy(line, lf->buffer, len+1); + (void)memcpy(line, lf->buffer, len); + line[len] = '\0'; cursor_pos = line + (lf->cursor - lf->buffer); lastc_argc = cursor_argc; /* remember last cursor pos */ lastc_argo = cursor_argo;