git.samba.org
/
gd
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b1a118
)
While 'data' is usually 0 terminated, nothing in the spec requires that. The correct...
author
Simo Sorce
<idra@samba.org>
Mon, 17 Dec 2007 20:21:38 +0000
(15:21 -0500)
committer
Simo Sorce
<idra@samba.org>
Mon, 17 Dec 2007 20:26:08 +0000
(15:26 -0500)
Simo.
source/libads/kerberos.c
patch
|
blob
|
history
diff --git
a/source/libads/kerberos.c
b/source/libads/kerberos.c
index 227f95d15e4b964ce704aeef896274df87a2b5e2..4fc23956bdef17689263021d2715bedff73bbd62 100644
(file)
--- a/
source/libads/kerberos.c
+++ b/
source/libads/kerberos.c
@@
-521,7
+521,10
@@
char *kerberos_get_default_realm_from_ccache( void )
#if defined(HAVE_KRB5_PRINCIPAL_GET_REALM)
realm = SMB_STRDUP(krb5_principal_get_realm(ctx, princ));
#elif defined(HAVE_KRB5_PRINC_REALM)
- realm = SMB_STRDUP(krb5_princ_realm(ctx, princ)->data);
+ {
+ krb5_data *realm_data = krb5_princ_realm(ctx, princ);
+ realm = SMB_STRNDUP(realm_data->data, realm_data->length);
+ }
#endif
out: