krb5 commit [krb5-1.10]: Use gssalloc in krb5_gss_export_name

Tom Yu tlyu at MIT.EDU
Mon Aug 13 16:43:49 EDT 2012


https://github.com/krb5/krb5/commit/af4ba305e3d0164ed70bbf089acad614e288312a
commit af4ba305e3d0164ed70bbf089acad614e288312a
Author: Greg Hudson <ghudson at mit.edu>
Date:   Sat Aug 11 18:17:42 2012 -0400

    Use gssalloc in krb5_gss_export_name
    
    krb5_gss_export_name uses malloc to construct a gss_buffer_desc value,
    and should use gssalloc_malloc instead.
    
    (cherry picked from commit e54c8d7e6c6185ff4d0e1b472f98897c2e3fc5b3)
    
    ticket: 7233
    version_fixed: 1.10.4
    status: resolved

 src/lib/gssapi/krb5/export_name.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lib/gssapi/krb5/export_name.c b/src/lib/gssapi/krb5/export_name.c
index 55c9e83..485ebfb 100644
--- a/src/lib/gssapi/krb5/export_name.c
+++ b/src/lib/gssapi/krb5/export_name.c
@@ -61,7 +61,7 @@ krb5_gss_export_name(OM_uint32 *minor_status, const gss_name_t input_name,
     krb5_free_context(context);
     length = strlen(str);
     exported_name->length = 10 + length + gss_mech_krb5->length;
-    exported_name->value = malloc(exported_name->length);
+    exported_name->value = gssalloc_malloc(exported_name->length);
     if (!exported_name->value) {
         free(str);
         if (minor_status)


More information about the cvs-krb5 mailing list