diff options
| author | cgd <cgd@NetBSD.org> | 1995-06-18 10:58:06 +0000 |
|---|---|---|
| committer | cgd <cgd@NetBSD.org> | 1995-06-18 10:58:06 +0000 |
| commit | 3d113b326b8a0d0230b2d2902c9153b3fdcae1fa (patch) | |
| tree | 48ec9e48ee4d3ce857819798e115ccfdb0083411 /usr.bin/find/function.c | |
| parent | 2f62eae02dffc24a3536955eb397e238898e09a7 (diff) | |
don't assume f_fstypename is larger than MFSNAMELEN or is nul-terminated
Diffstat (limited to 'usr.bin/find/function.c')
| -rw-r--r-- | usr.bin/find/function.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c index abece4ce683..88c127a42f9 100644 --- a/usr.bin/find/function.c +++ b/usr.bin/find/function.c @@ -36,7 +36,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)function.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$Id: function.c,v 1.15 1994/10/18 17:02:44 mycroft Exp $"; +static char rcsid[] = "$Id: function.c,v 1.16 1995/06/18 11:00:17 cgd Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -345,7 +345,7 @@ f_fstype(plan, entry) static int first = 1; struct statfs sb; static short val; - static char fstype[MFSNAMELEN+1]; + static char fstype[MFSNAMELEN]; char *p, save[2]; /* Only check when we cross mount point. */ @@ -386,7 +386,6 @@ f_fstype(plan, entry) */ val = sb.f_flags; strncpy(fstype, sb.f_fstypename, MFSNAMELEN); - fstype[MFSNAMELEN] = '\0'; } switch (plan->flags) { case F_MTFLAG: |
