From 8012fb2cfeede6ecae1346725141354f2897887e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 30 Aug 2005 01:58:03 +0000 Subject: r9774: r11605@blu: tridge | 2005-08-30 12:02:19 +1000 make sure we don't walk off the end of the hash array (This used to be commit 3c32f24e2c6a99ec294fb16e1684cd22b08f2df4) --- source4/lib/tdb/common/tdb.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/lib/tdb') diff --git a/source4/lib/tdb/common/tdb.c b/source4/lib/tdb/common/tdb.c index d6861efe13..3477d7e4be 100644 --- a/source4/lib/tdb/common/tdb.c +++ b/source4/lib/tdb/common/tdb.c @@ -1287,6 +1287,9 @@ static int tdb_next_lock(TDB_CONTEXT *tdb, struct tdb_traverse_lock *tlock, break; } } + if (tlock->hash == tdb->header.hash_size) { + continue; + } } else { if (ofs_read(tdb, TDB_HASH_TOP(tlock->hash), &off) == 0 && off == 0) { -- cgit