The Samba-Bugzilla – Attachment 10062 Details for
Bug 10685
Byte range locking - the checking for overlapping pending locks code has an off-by-one error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for master.
0001-s3-smbd-Locking-fix-off-by-one-calculation-in-brl_pe.patch (text/plain), 1.34 KB, created by
Jeremy Allison
on 2014-07-01 22:39:03 UTC
(
hide
)
Description:
git-am fix for master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2014-07-01 22:39:03 UTC
Size:
1.34 KB
patch
obsolete
>From 4622811ae182fcab3741e417ddac7f665b78db13 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 1 Jul 2014 13:30:50 -0700 >Subject: [PATCH] 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 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c >index e134aac..2ab7092 100644 >--- a/source3/locking/brlock.c >+++ b/source3/locking/brlock.c >@@ -263,7 +263,7 @@ static bool brl_pending_overlap(const struct lock_struct *lock, const struct loc > { > if ((lock->start <= pend_lock->start) && (lock->start + lock->size > pend_lock->start)) > return True; >- if ((lock->start >= pend_lock->start) && (lock->start <= pend_lock->start + pend_lock->size)) >+ if ((lock->start >= pend_lock->start) && (lock->start < pend_lock->start + pend_lock->size)) > return True; > return False; > } >-- >2.0.0.526.g5318336 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
obnox
:
review+
Actions:
View
Attachments on
bug 10685
: 10062