s3: smbd: Locking, fix off-by one calculation in brl_pending_overlap().
authorJeremy Allison <jra@samba.org>
Tue, 1 Jul 2014 20:30:50 +0000 (13:30 -0700)
committerKarolin Seeger <kseeger@samba.org>
Fri, 11 Jul 2014 07:27:04 +0000 (09:27 +0200)
commita4622adc5caeb80a91580d4c1193385cf2f33943
tree77123dec9105819db284442ac5548269f4292ac7
parent2d1dd83e9ec4333f6d68a471850079a8da8a90d5
s3: smbd: Locking, fix off-by one calculation in brl_pending_overlap().

Consider:

lock = start=110,size=10
pend_lock = 100, size=10

Should not overlap. However,

(lock->start <= pend_lock->start + pend_lock->size)
     110             100                10

is true, so it returns true (overlap).

lock->start <= pend_lock->start + pend_lock->size

should be:

lock->start < pend_lock->start + pend_lock->size

https://bugzilla.samba.org/show_bug.cgi?id=10685

Signed-off-by: Jeremy Allison <jra@samba.org>
source3/locking/brlock.c