[PATCH] dsdb: Fix a crash in an error return

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri Oct 10 07:41:41 MDT 2014


Hi!

Review&push would be appreciated!

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 599c0727f31ab2626bed0076e7ad5fd7567a6ea8 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 10 Oct 2014 15:37:55 +0200
Subject: [PATCH] dsdb: Fix a crash in an error return

In an error return we have

/* Back it out, if it fails on one */
for (i--; i >= 0; i--) {
	ldb_next_del_trans(data->partitions[i]->module);
}

With unsigned int i this will spin and del_trans somewhere far off :-)

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source4/dsdb/samdb/ldb_modules/partition.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index f2624a2..b501ff1 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -805,7 +805,7 @@ static int partition_rename(struct ldb_module *module, struct ldb_request *req)
 /* start a transaction */
 static int partition_start_trans(struct ldb_module *module)
 {
-	unsigned int i;
+	int i;
 	int ret;
 	struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
 							      struct partition_private_data);
-- 
2.1.0



More information about the samba-technical mailing list