summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/file/apprentice.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/file/apprentice.c b/usr.bin/file/apprentice.c
index 63fec5148fc..4214aec2cb0 100644
--- a/usr.bin/file/apprentice.c
+++ b/usr.bin/file/apprentice.c
@@ -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 @@ GetDesc:
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) {