diff options
author | Jeremy Allison <jra@samba.org> | 2004-05-07 18:14:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:51:29 -0500 |
commit | 7d9019432f49e887736307cb5c613671f66c51dd (patch) | |
tree | 90bed67f0f2232ecf1fd47a14cb245c1517b62c1 /source3 | |
parent | a442c65e59cd0b7667087f90522883475dfb7eee (diff) | |
download | samba-7d9019432f49e887736307cb5c613671f66c51dd.tar.gz samba-7d9019432f49e887736307cb5c613671f66c51dd.tar.bz2 samba-7d9019432f49e887736307cb5c613671f66c51dd.zip |
r565: Uninitialized data fixes from kawasa_r@itg.hitachi.co.jp.
Jeremy.
(This used to be commit c23a73324b335e42877551283b274f6d12f2c1a7)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/nsswitch/wb_client.c | 1 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_group.c | 3 | ||||
-rw-r--r-- | source3/nsswitch/winbindd_pam.c | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/source3/nsswitch/wb_client.c b/source3/nsswitch/wb_client.c index 5d43139245..a1c71becf0 100644 --- a/source3/nsswitch/wb_client.c +++ b/source3/nsswitch/wb_client.c @@ -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); diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index 4800ab20cf..7b4529144e 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -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; diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c index c1840b6053..25f53e7a53 100644 --- a/source3/nsswitch/winbindd_pam.c +++ b/source3/nsswitch/winbindd_pam.c @@ -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); |