If the canned string is "", its no use to the user, make it fall back
to the default error string. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21248 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -79,7 +79,7 @@ _gss_mg_get_error(const gss_OID mech, OM_uint32 type,
|
||||
|
||||
switch (type) {
|
||||
case GSS_C_GSS_CODE: {
|
||||
if (value != mg->maj_stat)
|
||||
if (value != mg->maj_stat || mg->maj_error.length == 0)
|
||||
break;
|
||||
string->value = malloc(mg->maj_error.length);
|
||||
string->length = mg->maj_error.length;
|
||||
@@ -87,7 +87,7 @@ _gss_mg_get_error(const gss_OID mech, OM_uint32 type,
|
||||
return GSS_S_COMPLETE;
|
||||
}
|
||||
case GSS_C_MECH_CODE: {
|
||||
if (value != mg->min_stat)
|
||||
if (value != mg->min_stat || mg->min_error.length == 0)
|
||||
break;
|
||||
string->value = malloc(mg->min_error.length);
|
||||
string->length = mg->min_error.length;
|
||||
|
Reference in New Issue
Block a user