diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2007-01-12 14:33:02 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2007-01-12 14:33:02 +0000 |
commit | c7f0db355629855bc89eb442c5d25b4d62adf4b1 (patch) | |
tree | 40fc264f694518ca005ce09d2e9cf1be091f1173 | |
parent | 0f442b06b2ec8b9eae2e8bae64744f1e76d459d0 (diff) |
Also check for 'num < 1' in ffs2_balloc(), no functional change
-rw-r--r-- | sys/ufs/ffs/ffs_balloc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c index 1970646eefa..ef15fe73c03 100644 --- a/sys/ufs/ffs/ffs_balloc.c +++ b/sys/ufs/ffs/ffs_balloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_balloc.c,v 1.27 2007/01/11 08:47:52 pedro Exp $ */ +/* $OpenBSD: ffs_balloc.c,v 1.28 2007/01/12 14:33:01 pedro Exp $ */ /* $NetBSD: ffs_balloc.c,v 1.3 1996/02/09 22:22:21 christos Exp $ */ /* @@ -601,6 +601,11 @@ ffs2_balloc(struct inode *ip, off_t off, int size, struct ucred *cred, if (error) return (error); +#ifdef DIAGNOSTIC + if (num < 1) + panic("ffs2_balloc: ufs_bmaparray returned indirect block"); +#endif + /* * Fetch the first indirect block allocating it necessary. */ |