git.samba.org
/
mat
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
auth/credentials: add a missing talloc check to cli_credentials_set_nt_hash()
[mat/samba.git]
/
auth
/
credentials
/
credentials_ntlm.c
diff --git
a/auth/credentials/credentials_ntlm.c
b/auth/credentials/credentials_ntlm.c
index 5e9aeeda9544d0df263002ae9dadd07873e50426..f339c9b6dc2646147322862136b603dec5f0e009 100644
(file)
--- 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;