From ca53ee4e11367b2ec6be2318d14e811f8829e2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Thu, 21 Jun 2007 00:45:13 +0000 Subject: [PATCH] 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 --- lib/gssapi/mech/context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gssapi/mech/context.c b/lib/gssapi/mech/context.c index 0f92ab59e..b5d4bd874 100644 --- a/lib/gssapi/mech/context.c +++ b/lib/gssapi/mech/context.c @@ -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;