From 875c1ec3b65065885e4ffd93f838bda9a82b8f53 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Mon, 7 Nov 2011 17:33:25 +0000 Subject: [PATCH] bugfix: off-by-one in span assignment The test in _check_spanno_and_basechan() was off by one (used '<' instead of '<=') Signed-off-by: Tzafrir Cohen Acked-by: Shaun Ruffell git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10327 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 153ae87..4214ad3 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -6751,7 +6751,7 @@ _check_spanno_and_basechan(struct dahdi_span *span, u32 spanno, u32 basechan) if (next_channo == -1) break; - if ((basechan + span->channels) < next_channo) + if ((basechan + span->channels) <= next_channo) break; /* Cannot fit the span into the requested location. Abort. */