git.samba.org
/
nivanova
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b566e7
)
auth/credentials: Add talloc NULL check in cli_credentials_set_principal()
author
Andreas Schneider
<asn@samba.org>
Thu, 6 Oct 2016 06:16:57 +0000
(08:16 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 20 Dec 2016 12:52:09 +0000
(13:52 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
auth/credentials/credentials.c
patch
|
blob
|
history
diff --git
a/auth/credentials/credentials.c
b/auth/credentials/credentials.c
index 9a935c6cf39b6ec13adaa9e1094b6528990d4ca7..06648c7f99810450afe691a88761f9d1fe9562e7 100644
(file)
--- a/
auth/credentials/credentials.c
+++ b/
auth/credentials/credentials.c
@@
-268,7
+268,11
@@
_PUBLIC_ bool cli_credentials_set_principal(struct cli_credentials *cred,
{
if (obtained >= cred->principal_obtained) {
cred->principal = talloc_strdup(cred, val);
+ if (cred->principal == NULL) {
+ return false;
+ }
cred->principal_obtained = obtained;
+
cli_credentials_invalidate_ccache(cred, cred->principal_obtained);
return true;
}