[SCM] Samba Shared Repository - branch v3-4-test updated -
release-4-0-0alpha7-1046-gdbd5dd8
Jim McDonough
jmcd at samba.org
Thu May 21 20:33:52 GMT 2009
The branch, v3-4-test has been updated
via dbd5dd808f14b1df0ed3dabd0553baddad2d186b (commit)
from c57de2c23d4208d4d7d06decdb1663670faa228d (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test
- Log -----------------------------------------------------------------
commit dbd5dd808f14b1df0ed3dabd0553baddad2d186b
Author: Jim McDonough <jmcd at samba.org>
Date: Thu May 21 16:26:26 2009 -0400
Detect tight loop in tdb_find()
-----------------------------------------------------------------------
Summary of changes:
lib/tdb/common/tdb.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/tdb/common/tdb.c b/lib/tdb/common/tdb.c
index 8c61ec1..b59bb15 100644
--- a/lib/tdb/common/tdb.c
+++ b/lib/tdb/common/tdb.c
@@ -96,6 +96,11 @@ static tdb_off_t tdb_find(struct tdb_context *tdb, TDB_DATA key, uint32_t hash,
NULL) == 0) {
return rec_ptr;
}
+ /* detect tight infinite loop */
+ if (rec_ptr == r->next) {
+ TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_find: loop detected.\n"));
+ return TDB_ERRCODE(TDB_ERR_CORRUPT, 0);
+ }
rec_ptr = r->next;
}
return TDB_ERRCODE(TDB_ERR_NOEXIST, 0);
--
Samba Shared Repository
More information about the samba-cvs
mailing list