s3: smbd: Locking, fix off-by one calculation in brl_pending_overlap().
commitc8904fa46ad29e3e6023477a9c9dfe730b628c19
authorJeremy Allison <jra@samba.org>
Tue, 1 Jul 2014 20:30:50 +0000 (1 13:30 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 15 Jul 2014 10:46:12 +0000 (15 12:46 +0200)
tree6b0958ccd177574a1ba944f67ee0428225e38620
parent74a80557f6d9b7a85656ec701ab70eb091fe2e11
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