[PATCH] Fix a few CIDs

Stefan Metzmacher metze at samba.org
Tue Apr 3 21:18:24 UTC 2018


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.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180403/cd18a86b/signature.sig>


More information about the samba-technical mailing list