diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/df/df.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/df/df.c b/bin/df/df.c index 9d10c2e28cf..da951b82862 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -1,4 +1,4 @@ -/* $OpenBSD: df.c,v 1.14 1997/04/14 20:25:37 kstailey Exp $ */ +/* $OpenBSD: df.c,v 1.15 1997/06/01 07:03:18 downsj Exp $ */ /* $NetBSD: df.c,v 1.21.2.1 1995/11/01 00:06:11 jtc Exp $ */ /* @@ -49,7 +49,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)df.c 8.7 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: df.c,v 1.14 1997/04/14 20:25:37 kstailey Exp $"; +static char rcsid[] = "$OpenBSD: df.c,v 1.15 1997/06/01 07:03:18 downsj Exp $"; #endif #endif /* not lint */ @@ -454,6 +454,10 @@ ufs_df(file, sfsp) (void)close(rfd); return (-1); } + if (sblock.fs_magic != FS_MAGIC) { + (void)close(rfd); + return (-1); + } sfsp->f_type = 0; sfsp->f_flags = 0; sfsp->f_bsize = sblock.fs_fsize; |