diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-02-25 07:30:51 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-02-25 07:30:51 +0000 |
commit | 471619eebe5b8803bf6d14bd1dd9e27fa95093ad (patch) | |
tree | c6670bf5d22f63329ea89d8631927ed6d7e4fe6c /sys/ufs | |
parent | 5a272fc0da59ba458fe6f9cb521920bfba02384a (diff) |
Add missing check for i_ffs_nlink > LINK_MAX; marcs@znep.com
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index f728ab4f702..7f966a21b2b 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_vnops.c,v 1.23 1999/01/16 12:56:27 niklas Exp $ */ +/* $OpenBSD: ufs_vnops.c,v 1.24 1999/02/25 07:30:50 millert Exp $ */ /* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */ /* @@ -973,6 +973,10 @@ abortit: * completing our work, the link count * may be wrong, but correctable. */ + if ((nlink_t)dp->i_ffs_nlink >= LINK_MAX) { + error = EMLINK; + goto bad; + } ip->i_effnlink++; ip->i_ffs_nlink++; ip->i_flag |= IN_CHANGE; |