From 33dac40f3af5c6f973cad2e156f587bfb90e52e8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 28 Mar 2018 15:43:53 -0500 Subject: [PATCH] dsdb: Fix CID 1034966 Uninitialized scalar variable "continue" in a do-while loop jumps to the "while"-check, so "id_exists" needs to be initialized by that point. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13367 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Reviewed-by: Stefan Metzmacher (cherry picked from commit 925d1f23291c4bdbc832977b2b4577964b8301c8) --- source4/dsdb/samdb/ldb_modules/samldb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index 3e429e1476a..11da629f4ec 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -875,6 +875,7 @@ static int samldb_add_handle_msDS_IntId(struct samldb_ctx *ac) * order to be sure. */ if (dsdb_attribute_by_attributeID_id(schema, msds_intid)) { + id_exists = true; msds_intid = generate_random() % 0X3FFFFFFF; msds_intid += 0x80000000; continue; -- 2.17.0.484.g0c8726318c-goog