Commit 7d901943 authored by Jeremy Allison's avatar Jeremy Allison Committed by Gerald (Jerry) Carter
Browse files

r565: Uninitialized data fixes from kawasa_r@itg.hitachi.co.jp.

Jeremy.
(This used to be commit c23a73324b335e42877551283b274f6d12f2c1a7)
parent a442c65e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -270,6 +270,7 @@ static int wb_getgroups(const char *user, gid_t **groups)

	/* Call winbindd */

	ZERO_STRUCT(request);
	fstrcpy(request.data.username, user);

	ZERO_STRUCT(response);
+3 −0
Original line number Diff line number Diff line
@@ -631,6 +631,9 @@ enum winbindd_result winbindd_getgrent(struct winbindd_cli_state *state)
	     malloc(num_groups * sizeof(struct winbindd_gr))) == NULL)
		return WINBINDD_ERROR;

	memset(state->response.extra_data, '\0',
		num_groups * sizeof(struct winbindd_gr) );

	state->response.data.num_entries = 0;

	group_list = (struct winbindd_gr *)state->response.extra_data;
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ static NTSTATUS append_info3_as_ndr(TALLOC_CTX *mem_ctx,
		prs_mem_free(&ps);
		return NT_STATUS_NO_MEMORY;
	}
	memset( state->response.extra_data, '\0', size );
	prs_copy_all_data_out(state->response.extra_data, &ps);
	state->response.length += size;
	prs_mem_free(&ps);