Initialize localname on error in gss_localname
authorGreg Hudson <ghudson@mit.edu>
Thu, 6 Oct 2011 16:38:35 +0000 (16:38 +0000)
committerGreg Hudson <ghudson@mit.edu>
Thu, 6 Oct 2011 16:38:35 +0000 (16:38 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25316 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/mechglue/gssd_pname_to_uid.c

index eab6bd6f58e5c3b7a016ab8723ae2d0a6ac99e54..7254c3a416b7a16eb4c12a65880e5d783705c3db 100644 (file)
@@ -124,10 +124,11 @@ gss_localname(OM_uint32 *minor,
     gss_union_name_t unionName;
     gss_name_t mechName = GSS_C_NO_NAME, mechNameP;
 
-    /*
-     * find the appropriate mechanism specific pname_to_uid procedure and
-     * call it.
-     */
+    if (localname != GSS_C_NO_BUFFER) {
+       localname->length = 0;
+       localname->value = NULL;
+    }
+
     if (minor == NULL)
         return GSS_S_CALL_INACCESSIBLE_WRITE;