From: Volker Lendecke Date: Wed, 28 Mar 2018 20:43:53 +0000 (-0500) Subject: dsdb: Fix CID 1034966 Uninitialized scalar variable X-Git-Tag: talloc-2.1.13~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=925d1f23291c4bdbc832977b2b4577964b8301c8;p=thirdparty%2Fsamba.git 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 --- diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index 108235a91b4..a46fd3735c8 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;