summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2015-02-09 09:06:32 +0100
committerGünther Deschner <gd@samba.org>2015-03-12 17:13:42 +0100
commit3abccced8cf057ce0768a5acf7e828db3823fae2 (patch)
treee41057015b0548a286d3501af88ab3f1da719b45 /auth
parent3098a432665b54b3e578b6e6b04b9fde5de43b72 (diff)
downloadsamba-3abccced8cf057ce0768a5acf7e828db3823fae2.tar.gz
auth/credentials: add a missing talloc check to cli_credentials_set_nt_hash()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'auth')
-rw-r--r--auth/credentials/credentials_ntlm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/auth/credentials/credentials_ntlm.c b/auth/credentials/credentials_ntlm.c
index 5e9aeeda954..f339c9b6dc2 100644
--- a/auth/credentials/credentials_ntlm.c
+++ b/auth/credentials/credentials_ntlm.c
@@ -276,6 +276,9 @@ _PUBLIC_ bool cli_credentials_set_nt_hash(struct cli_credentials *cred,
cli_credentials_set_password(cred, NULL, obtained);
if (nt_hash) {
cred->nt_hash = talloc(cred, struct samr_Password);
+ if (cred->nt_hash == NULL) {
+ return false;
+ }
*cred->nt_hash = *nt_hash;
} else {
cred->nt_hash = NULL;