]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Use gssalloc in krb5_gss_export_name
authorGreg Hudson <ghudson@mit.edu>
Sat, 11 Aug 2012 22:17:42 +0000 (18:17 -0400)
committerTom Yu <tlyu@mit.edu>
Mon, 13 Aug 2012 19:41:55 +0000 (15:41 -0400)
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

index 55c9e8358acc2cf036f814a6a838f06f66e4945b..485ebfb6cdf37280f72a1692f6f3100afc47d255 100644 (file)
@@ -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)