From f064547294cb9c586569aa39beed8edd7efcd251 Mon Sep 17 00:00:00 2001 From: Love Hornquist Astrand Date: Mon, 12 Oct 2009 10:55:12 -0700 Subject: [PATCH] Use com_right_r(). --- lib/krb5/error_string.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/krb5/error_string.c b/lib/krb5/error_string.c index e86f74f5d..9c4c23884 100644 --- a/lib/krb5/error_string.c +++ b/lib/krb5/error_string.c @@ -234,10 +234,12 @@ krb5_get_error_message(krb5_context context, krb5_error_code code) if (code == 0) return strdup("Success"); - - cstr = krb5_get_err_text(context, code); - if (cstr) - return strdup(cstr); + { + char buf[128]; + str = com_right_r(context->et_list, code, buf, sizeof(buf)); + if (str) + return stddup(str); + } if (asprintf(&str, "", (int)code) == -1) return NULL;