krb5 commit [krb5-1.11]: Use calloc, not k5calloc in ldap back end
Tom Yu
tlyu at mit.edu
Fri Feb 20 12:42:28 EST 2015
https://github.com/krb5/krb5/commit/c582dfb3cc5c28cb8f909532184495c429c55ffb
commit c582dfb3cc5c28cb8f909532184495c429c55ffb
Author: Tom Yu <tlyu at mit.edu>
Date: Fri Feb 20 11:43:33 2015 -0500
Use calloc, not k5calloc in ldap back end
The changes cherry picked in 0149ee13d51b48d77fbbaa5c1109036332a5577c
rely on k5calloc(), which is not present in the 1.11 branch.
Compensate by using calloc() instead.
ticket: 8102
version_fixed: 1.11.6
status: resolved
src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c
index 56404e3..cb303fd 100644
--- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c
+++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c
@@ -422,9 +422,11 @@ krb5_encode_krbsecretkey(krb5_key_data *key_data_in, int n_key_data,
return NULL;
/* Make a shallow copy of the key data so we can alter it. */
- key_data = k5calloc(n_key_data, sizeof(*key_data), &err);
- if (key_data_in == NULL)
+ key_data = calloc(n_key_data, sizeof(*key_data));
+ if (key_data_in == NULL) {
+ err = ENOMEM;
goto cleanup;
+ }
memcpy(key_data, key_data_in, n_key_data * sizeof(*key_data));
/* Unpatched krb5 1.11 and 1.12 cannot decode KrbKey sequences with no salt
More information about the cvs-krb5
mailing list