mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
lib: Fix an array subscript is above array bounds error
gcc 5.1.1 complains with: lib/util/idtree.c:184:15: error: array subscript is above array bounds Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
c2de8425d9
commit
87f8bddffe
@ -181,8 +181,13 @@ restart:
|
|||||||
*/
|
*/
|
||||||
n = id;
|
n = id;
|
||||||
while (p->bitmap == IDR_FULL) {
|
while (p->bitmap == IDR_FULL) {
|
||||||
if (!(p = pa[++l]))
|
if (l >= MAX_LEVEL) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
p = pa[++l];
|
||||||
|
if (p == NULL) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
n = n >> IDR_BITS;
|
n = n >> IDR_BITS;
|
||||||
set_bit((n & IDR_MASK), p->bitmap);
|
set_bit((n & IDR_MASK), p->bitmap);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user