"Error: UNINIT (CWE-457):
samba-4.20.0rc2/source4/torture/rpc/samsync.c:342: var_decl: Declaring variable ""dom_sid"" without initializer.
samba-4.20.0rc2/source4/torture/rpc/samsync.c:385: uninit_use_in_call: Using uninitialized value ""dom_sid"" when calling ""dom_sid_dup"".
383| }
384| if (samsync_state->domain_handle[database_id]) {
385|-> samsync_state->sid[database_id] = dom_sid_dup(samsync_state, dom_sid);
386| }
387|"
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
int database_id, struct netr_DELTA_ENUM *delta)
{
struct netr_DELTA_DOMAIN *domain = delta->delta_union.domain;
- struct dom_sid *dom_sid;
+ struct dom_sid *dom_sid = NULL;
struct samr_QueryDomainInfo q[14]; /* q[0] will be unused simple for clarity */
union samr_DomainInfo *info[14];
uint16_t levels[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13};