summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-03-31 22:05:02 +0200
committerVolker Lendecke <vl@samba.org>2010-03-31 22:07:38 +0200
commit15d58f688f3ebc267632eaecbe5e18ee994729ea (patch)
treed08a5fe00b86702b9e69f0e39ecbda6543d4dd0c /source3
parent6d9b2e62cbd7712fe8cfe99c9d596a375a0abfad (diff)
downloadsamba-15d58f688f3ebc267632eaecbe5e18ee994729ea.tar.gz
samba-15d58f688f3ebc267632eaecbe5e18ee994729ea.tar.bz2
samba-15d58f688f3ebc267632eaecbe5e18ee994729ea.zip
s3: Ensure null termination in winbindd_pam_chauthtok()
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_pam.c4
1 files changed, 4 insertions, 0 deletions
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));