From dc7518065f63696adc3895fd010ee033f148c8a0 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Aug 07 2012 00:27:00 +0000 Subject: Output type can be null in gss_display_name --- diff --git a/proxy/src/mechglue/gpm_import_and_canon_name.c b/proxy/src/mechglue/gpm_import_and_canon_name.c index 61abbbc..c5a5ba1 100644 --- a/proxy/src/mechglue/gpm_import_and_canon_name.c +++ b/proxy/src/mechglue/gpm_import_and_canon_name.c @@ -47,7 +47,7 @@ OM_uint32 gpm_display_name(OM_uint32 *minor_status, if (!input_name) { return GSS_S_CALL_INACCESSIBLE_READ; } - if (!output_name_buffer || !output_name_type) { + if (!output_name_buffer) { return GSS_S_CALL_INACCESSIBLE_WRITE; } @@ -83,12 +83,14 @@ OM_uint32 gpm_display_name(OM_uint32 *minor_status, goto done; } - ret = gp_conv_gssx_to_oid_alloc(&name->name_type, output_name_type); - if (ret) { - gss_release_buffer(&discard, output_name_buffer); - ret_min = ret; - ret_maj = GSS_S_FAILURE; - goto done; + if (output_name_type) { + ret = gp_conv_gssx_to_oid_alloc(&name->name_type, output_name_type); + if (ret) { + gss_release_buffer(&discard, output_name_buffer); + ret_min = ret; + ret_maj = GSS_S_FAILURE; + goto done; + } } ret_min = 0;