diff options
author | 2007-03-15 10:27:00 +0000 | |
---|---|---|
committer | 2007-03-15 10:27:00 +0000 | |
commit | 127a507099aeda3a795a06aa6a00361a78b36f1e (patch) | |
tree | 03e500959dbc4a7dac2d4fb43c94ceab937ecb5b | |
parent | Since p_flag is often manipulated in interrupts and without biglock (diff) | |
download | wireguard-openbsd-127a507099aeda3a795a06aa6a00361a78b36f1e.tar.xz wireguard-openbsd-127a507099aeda3a795a06aa6a00361a78b36f1e.zip |
Check for cg_irotor and cg_frotor being negative, okay millert@ deraadt@
-rw-r--r-- | sbin/fsck_ffs/pass5.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c index e8897528b6b..632763ea009 100644 --- a/sbin/fsck_ffs/pass5.c +++ b/sbin/fsck_ffs/pass5.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass5.c,v 1.24 2006/04/27 02:40:03 pedro Exp $ */ +/* $OpenBSD: pass5.c,v 1.25 2007/03/15 10:27:00 pedro Exp $ */ /* $NetBSD: pass5.c,v 1.16 1996/09/27 22:45:18 christos Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pass5.c 8.6 (Berkeley) 11/30/94"; #else -static const char rcsid[] = "$OpenBSD: pass5.c,v 1.24 2006/04/27 02:40:03 pedro Exp $"; +static const char rcsid[] = "$OpenBSD: pass5.c,v 1.25 2007/03/15 10:27:00 pedro Exp $"; #endif #endif /* not lint */ @@ -212,11 +212,11 @@ pass5(void) newcg->cg_rotor = cg->cg_rotor; else newcg->cg_rotor = 0; - if (cg->cg_frotor < newcg->cg_ndblk) + if (cg->cg_frotor >= 0 && cg->cg_frotor < newcg->cg_ndblk) newcg->cg_frotor = cg->cg_frotor; else newcg->cg_frotor = 0; - if (cg->cg_irotor < newcg->cg_niblk) + if (cg->cg_irotor >= 0 && cg->cg_irotor < newcg->cg_niblk) newcg->cg_irotor = cg->cg_irotor; else newcg->cg_irotor = 0; |