[28816] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit [krb5-1.11]: Use calloc, not k5calloc in ldap back end

daemon@ATHENA.MIT.EDU (Tom Yu)
Fri Feb 20 12:42:46 2015

Date: Fri, 20 Feb 2015 12:42:28 -0500
From: Tom Yu <tlyu@mit.edu>
Message-Id: <201502201742.t1KHgSAU026803@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/c582dfb3cc5c28cb8f909532184495c429c55ffb
commit c582dfb3cc5c28cb8f909532184495c429c55ffb
Author: Tom Yu <tlyu@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
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post