svn commit: samba r8668 - in branches/SAMBA_4_0/source/lib/ldb/ldb_tdb: .

tridge at samba.org tridge at samba.org
Thu Jul 21 08:06:39 GMT 2005


Author: tridge
Date: 2005-07-21 08:06:39 +0000 (Thu, 21 Jul 2005)
New Revision: 8668

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8668

Log:
fixed a segv during upgrade of a very old ldb. 
Thanks to volker for finding this one too. Keep them coming!

Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c	2005-07-21 07:59:01 UTC (rev 8667)
+++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c	2005-07-21 08:06:39 UTC (rev 8668)
@@ -1001,6 +1001,11 @@
 	/* check if the DN key has changed, perhaps due to the 
 	   case insensitivity of an element changing */
 	key2 = ltdb_key(module, msg->dn);
+	if (key2.dptr == NULL) {
+		/* probably a corrupt record ... darn */
+		ldb_debug(module->ldb, LDB_DEBUG_ERROR, "Invalid DN in re_index: %s\n", msg->dn);
+		return 0;
+	}
 	if (strcmp(key2.dptr, key.dptr) != 0) {
 		tdb_delete(tdb, key);
 		tdb_store(tdb, key2, data, 0);



More information about the samba-cvs mailing list