svn commit: samba r5533 - in
branches/SAMBA_4_0/source/lib/tdb/common: .
jra at samba.org
jra at samba.org
Thu Feb 24 01:10:58 GMT 2005
Author: jra
Date: 2005-02-24 01:10:57 +0000 (Thu, 24 Feb 2005)
New Revision: 5533
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5533
Log:
Patch to detect infinite loops when traversing a tdb from "Shlomi Yaakobovich" <Shlomi at exanet.com>
Jeremy.
Modified:
branches/SAMBA_4_0/source/lib/tdb/common/tdb.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/tdb/common/tdb.c
===================================================================
--- branches/SAMBA_4_0/source/lib/tdb/common/tdb.c 2005-02-24 01:07:09 UTC (rev 5532)
+++ branches/SAMBA_4_0/source/lib/tdb/common/tdb.c 2005-02-24 01:10:57 UTC (rev 5533)
@@ -1314,6 +1314,13 @@
goto fail;
return tlock->off;
}
+
+ /* Detect infinite loops. From "Shlomi Yaakobovich" <Shlomi at exanet.com>. */
+ if (tlock->off == rec->next) {
+ TDB_LOG((tdb, 0, "tdb_next_lock: loop detected.\n"));
+ goto fail;
+ }
+
/* Try to clean dead ones from old traverses */
current = tlock->off;
tlock->off = rec->next;
More information about the samba-cvs
mailing list