In krb5_gss_display_status, correct the sense of the
authorGreg Hudson <ghudson@mit.edu>
Tue, 12 Apr 2011 18:35:31 +0000 (18:35 +0000)
committerGreg Hudson <ghudson@mit.edu>
Tue, 12 Apr 2011 18:35:31 +0000 (18:35 +0000)
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

index f04872d8fbd2b9d9a9eb2d9187461a5911d0e94e..95fc3d3de4636efcf16b87f601254ab24093c9c5 100644 (file)
@@ -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);