From 15d58f688f3ebc267632eaecbe5e18ee994729ea Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 31 Mar 2010 22:05:02 +0200 Subject: s3: Ensure null termination in winbindd_pam_chauthtok() --- source3/winbindd/winbindd_pam.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3') diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 74b82370bf..aa804c801f 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -2014,6 +2014,10 @@ void winbindd_pam_chauthtok(struct winbindd_cli_state *state) struct winbindd_domain *contact_domain; NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; + /* Ensure null termination */ + state->request->data.chauthtok.user[ + sizeof(state->request->data.chauthtok.user)-1]='\0'; + DEBUG(3, ("[%5lu]: pam chauthtok %s\n", (unsigned long)state->pid, state->request->data.chauthtok.user)); -- cgit