summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2018-03-28 15:43:53 -0500
committerKarolin Seeger <kseeger@samba.org>2018-04-10 09:40:08 +0200
commit2c3060b6a6c8d03286906adb89452788988feeeb (patch)
tree36b38c063d2fe561de6e9066061c6b7e6be00d60 /source4/dsdb
parenta9ed1968e8bf435d98a9fa02d1f0265398c45523 (diff)
downloadsamba-2c3060b6a6c8d03286906adb89452788988feeeb.tar.gz
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 <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 925d1f23291c4bdbc832977b2b4577964b8301c8)
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c1
1 files changed, 1 insertions, 0 deletions
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;