=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/file/Attic/apprentice.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- src/usr.bin/file/Attic/apprentice.c 2004/09/25 09:19:35 1.20 +++ src/usr.bin/file/Attic/apprentice.c 2006/04/04 10:53:40 1.21 @@ -1,4 +1,4 @@ -/* $OpenBSD: apprentice.c,v 1.20 2004/09/25 09:19:35 otto Exp $ */ +/* $OpenBSD: apprentice.c,v 1.21 2006/04/04 10:53:40 pedro Exp $ */ /* * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; @@ -46,7 +46,7 @@ #endif #ifndef lint -FILE_RCSID("@(#)$Id: apprentice.c,v 1.20 2004/09/25 09:19:35 otto Exp $") +FILE_RCSID("@(#)$Id: apprentice.c,v 1.21 2006/04/04 10:53:40 pedro Exp $") #endif /* lint */ #define EATAB {while (isascii((unsigned char) *l) && \ @@ -698,8 +698,8 @@ m->nospflag = 1; } else m->nospflag = 0; - while ((m->desc[i++] = *l++) != '\0' && i < MAXDESC) - /* NULLBODY */; + + strlcpy(m->desc, l, sizeof(m->desc)); #ifndef COMPILE_ONLY if (action == FILE_CHECK) {