From fb67497ceeedf9a398cd670440f699e35b3baa4b Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 12 Apr 2011 18:35:31 +0000 Subject: [PATCH] In krb5_gss_display_status, correct the sense of the g_make_string_buffer test, and return GSS_S_FAILURE if it fails. Reported by snambakam@likewise.com. ticket: 6898 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24876 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/krb5/disp_status.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lib/gssapi/krb5/disp_status.c b/src/lib/gssapi/krb5/disp_status.c index f04872d8f..95fc3d3de 100644 --- a/src/lib/gssapi/krb5/disp_status.c +++ b/src/lib/gssapi/krb5/disp_status.c @@ -185,12 +185,13 @@ krb5_gss_display_status(minor_status, status_value, status_type, } /* If this fails, there's not much we can do... */ - if (g_make_string_buffer(krb5_gss_get_error_message(status_value), - status_string) != 0) + if (!g_make_string_buffer(krb5_gss_get_error_message(status_value), + status_string)) { *minor_status = ENOMEM; - else - *minor_status = 0; - return 0; + return(GSS_S_FAILURE); + } + *minor_status = 0; + return(GSS_S_COMPLETE); } else { *minor_status = 0; return(GSS_S_BAD_STATUS); -- 2.26.2