summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgilles <gilles@openbsd.org>2011-05-10 17:04:43 +0000
committergilles <gilles@openbsd.org>2011-05-10 17:04:43 +0000
commitc19d2a6ad30bd90d33d956dcff128c9c6f3ab92c (patch)
tree00087f218800f873d13d253e236b04cb4ca359a1
parentUpdate EXAMPLES to reflect current behaviour. (diff)
downloadwireguard-openbsd-c19d2a6ad30bd90d33d956dcff128c9c6f3ab92c.tar.xz
wireguard-openbsd-c19d2a6ad30bd90d33d956dcff128c9c6f3ab92c.zip
fix an off-by-one that made smtpd skip an "invalid" bucket that was
actually valid. bugfix tested by todd@
-rw-r--r--usr.sbin/smtpd/queue_shared.c4
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);
}