svn commit: samba r14308 - in branches/SAMBA_4_0/source/lib/util: .
tridge at samba.org
tridge at samba.org
Mon Mar 13 06:58:12 GMT 2006
Author: tridge
Date: 2006-03-13 06:58:09 +0000 (Mon, 13 Mar 2006)
New Revision: 14308
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14308
Log:
fixed an out of range shift and an uninitialised error
Modified:
branches/SAMBA_4_0/source/lib/util/idtree.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/util/idtree.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util/idtree.c 2006-03-13 06:57:11 UTC (rev 14307)
+++ branches/SAMBA_4_0/source/lib/util/idtree.c 2006-03-13 06:58:09 UTC (rev 14308)
@@ -107,6 +107,8 @@
int l, id;
uint32_t bm;
+ memset(pa, 0, sizeof(pa));
+
id = *starting_id;
p = idp->top;
l = idp->layers;
@@ -271,7 +273,7 @@
/* Mask off upper bits we don't use for the search. */
id &= MAX_ID_MASK;
- while (n > 0 && p) {
+ while (n >= IDR_BITS && p) {
n -= IDR_BITS;
p = p->ary[(id >> n) & IDR_MASK];
}
More information about the samba-cvs
mailing list