From: Tom Yu Date: Wed, 22 Feb 2012 04:11:51 +0000 (+0000) Subject: Pull up r25700 from trunk X-Git-Tag: krb5-1.10.1-final~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=254ccf1619c24d6a205817224f1d8644a9225ac4;p=krb5.git Pull up r25700 from trunk ------------------------------------------------------------------------ r25700 | ghudson | 2012-02-14 13:26:50 -0500 (Tue, 14 Feb 2012) | 9 lines ticket: 7089 subject: Initialize gss_get_name_attribute output buffers target_version: 1.10.1 tags: pullup GSS functions which accept gss_buffer_t output arguments should initialize those buffers to empty on startup (see gss_wrap, for instance). Do so for gss_get_name_attribute in the mechglue. ticket: 7089 version_fixed: 1.10.1 status: resolved git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-10@25708 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/mechglue/g_get_name_attr.c b/src/lib/gssapi/mechglue/g_get_name_attr.c index d9363c118..047d5d428 100644 --- a/src/lib/gssapi/mechglue/g_get_name_attr.c +++ b/src/lib/gssapi/mechglue/g_get_name_attr.c @@ -55,6 +55,14 @@ gss_get_name_attribute(OM_uint32 *minor_status, *authenticated = 0; if (complete != NULL) *complete = 0; + if (value != GSS_C_NO_BUFFER) { + value->value = NULL; + value->length = 0; + } + if (display_value != GSS_C_NO_BUFFER) { + display_value->value = NULL; + display_value->length = 0; + } *minor_status = 0;