krb5 commit: Use gssalloc in krb5_gss_export_name

Greg Hudson ghudson at MIT.EDU
Sat Aug 11 18:20:59 EDT 2012


https://github.com/krb5/krb5/commit/44df71234a77df6400704b3356767f98aa3dc15b
commit 44df71234a77df6400704b3356767f98aa3dc15b
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.
    
    ticket: 7233

 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