gss: Fix warnings

This commit is contained in:
Nicolas Williams
2021-03-27 23:28:17 -05:00
parent 65caff79a3
commit 96b7ea671d
14 changed files with 58 additions and 32 deletions

View File

@@ -158,6 +158,10 @@ gss_pname_to_uid(OM_uint32 *minor_status,
major = gss_localname(minor_status, pname, mech_type, &localname);
if (GSS_ERROR(major))
return major;
if (localname.length == 0) {
*minor_status = KRB5_NO_LOCALNAME;
return GSS_S_FAILURE;
}
szLocalname = malloc(localname.length + 1);
if (szLocalname == NULL) {