diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2011-05-10 17:04:44 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2011-05-10 17:04:44 +0000 |
commit | 8e5cbcbd5106ccb32b32b4be18110d0eea92c83f (patch) | |
tree | f5e742ba3ccfe26c49d798bb780e98fcf51568d7 /usr.sbin | |
parent | d92cb5bf12b5e2b649ed581c33fa5c715a38760e (diff) |
fix an off-by-one that made smtpd skip an "invalid" bucket that was
actually valid.
bugfix tested by todd@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/queue_shared.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/queue_shared.c b/usr.sbin/smtpd/queue_shared.c index 0019e898aff..541dbc2665c 100644 --- a/usr.sbin/smtpd/queue_shared.c +++ b/usr.sbin/smtpd/queue_shared.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue_shared.c,v 1.47 2011/05/01 12:57:11 eric Exp $ */ +/* $OpenBSD: queue_shared.c,v 1.48 2011/05/10 17:04:43 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -223,7 +223,7 @@ walk_queue(struct qwalk *q, char *fname) log_warnx("walk_queue: invalid bucket: %s", fname); return (QWALK_AGAIN); } - if (errno == ERANGE || q->bucket >= DIRHASH_BUCKETS - 1) { + if (errno == ERANGE || q->bucket >= DIRHASH_BUCKETS) { log_warnx("walk_queue: invalid bucket: %s", fname); return (QWALK_AGAIN); } |