Use com_right_r().

This commit is contained in:
Love Hornquist Astrand
2009-10-12 10:55:12 -07:00
parent 0c5a5849e1
commit f064547294

View File

@@ -234,10 +234,12 @@ krb5_get_error_message(krb5_context context, krb5_error_code code)
if (code == 0) if (code == 0)
return strdup("Success"); return strdup("Success");
{
cstr = krb5_get_err_text(context, code); char buf[128];
if (cstr) str = com_right_r(context->et_list, code, buf, sizeof(buf));
return strdup(cstr); if (str)
return stddup(str);
}
if (asprintf(&str, "<unknown error: %d>", (int)code) == -1) if (asprintf(&str, "<unknown error: %d>", (int)code) == -1)
return NULL; return NULL;