[SCM] Samba Shared Repository - branch v3-6-test updated
Jeremy Allison
jra at samba.org
Wed Oct 6 11:13:42 MDT 2010
The branch, v3-6-test has been updated
via bca6ebb idtree: fix right shift of signed ints, crash on large ids on AIX
from bd89735 s3: Make the write end of the echo responder pipe non-blocking
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit bca6ebb65dfac92534756338952005d1ff98eafd
Author: Rusty Russell <rusty at rustcorp.com.au>
Date: Tue Oct 5 13:06:19 2010 +1030
idtree: fix right shift of signed ints, crash on large ids on AIX
Right-shifting signed integers in undefined; indeed it seems that on
AIX with their compiler, doing a 30-bit shift on (INT_MAX-200) gives
0, not 1 as we might expect.
The obvious fix is to make id and oid unsigned: l (level count) is also
logically unsigned.
(Note: Samba doesn't generally get to ids > 1 billion, but ctdb does)
Reported-by: Chris Cowan <cc at us.ibm.com>
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
Autobuild-User: Rusty Russell <rusty at samba.org>
Autobuild-Date: Wed Oct 6 08:31:09 UTC 2010 on sn-devel-104
(cherry picked from commit 2db1987f5a3a4268ce64fe570ff598e3bf4ecc73)
-----------------------------------------------------------------------
Summary of changes:
lib/util/idtree.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/util/idtree.c b/lib/util/idtree.c
index c147961..6611992 100644
--- a/lib/util/idtree.c
+++ b/lib/util/idtree.c
@@ -105,7 +105,7 @@ static int sub_alloc(struct idr_context *idp, void *ptr, int *starting_id)
int n, m, sh;
struct idr_layer *p, *pn;
struct idr_layer *pa[MAX_LEVEL];
- int l, id, oid;
+ unsigned int l, id, oid;
uint32_t bm;
memset(pa, 0, sizeof(pa));
--
Samba Shared Repository
More information about the samba-cvs
mailing list