[PATCH] Fix a few CIDs

Jeremy Allison jra at samba.org
Tue Apr 3 22:42:19 UTC 2018


On Tue, Apr 03, 2018 at 11:18:24PM +0200, Stefan Metzmacher via samba-technical wrote:
> Am 03.04.2018 um 21:15 schrieb Volker Lendecke via samba-technical:
> > From b5820a24e065c1dd1c531d8ee7c2cddbb13dc42b Mon Sep 17 00:00:00 2001
> > From: Volker Lendecke <vl at samba.org>
> > Date: Wed, 28 Mar 2018 15:43:53 -0500
> > Subject: [PATCH 13/22] 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.
> > 
> > Signed-off-by: Volker Lendecke <vl at samba.org>
> > ---
> >  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 108235a..a46fd37 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;
> > -- 1.9.1
> 
> Can we get a bug report for this?
> I'm wondering if this is the source of some flakey tests.

OK, created bug:

https://bugzilla.samba.org/show_bug.cgi?id=13367

for this. I was reviewing too, so I've pushed all the
others you didn't have any issues with.

Jeremy.



More information about the samba-technical mailing list