From eff8df852df61ffc25248058f0dae6b9f9fbc299 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Wed, 4 Aug 1999 17:17:34 +0000 Subject: [PATCH] (calling_error, routine_error): right shift the code to make it possible to index into the arrays git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6725 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/gssapi/display_status.c | 4 ++++ lib/gssapi/krb5/display_status.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/gssapi/display_status.c b/lib/gssapi/display_status.c index cdccdced4..1c748c4fe 100644 --- a/lib/gssapi/display_status.c +++ b/lib/gssapi/display_status.c @@ -50,6 +50,8 @@ calling_error(OM_uint32 v) "A parameter was malformed" }; + v >>= GSS_C_CALLING_ERROR_OFFSET; + if (v == 0) return ""; else if (v >= sizeof(msgs)/sizeof(*msgs)) @@ -84,6 +86,8 @@ routine_error(OM_uint32 v) "The provided name was not a mechanism name.", }; + v >>= GSS_C_ROUTINE_ERROR_OFFSET; + if (v == 0) return ""; else if (v >= sizeof(msgs)/sizeof(*msgs)) diff --git a/lib/gssapi/krb5/display_status.c b/lib/gssapi/krb5/display_status.c index cdccdced4..1c748c4fe 100644 --- a/lib/gssapi/krb5/display_status.c +++ b/lib/gssapi/krb5/display_status.c @@ -50,6 +50,8 @@ calling_error(OM_uint32 v) "A parameter was malformed" }; + v >>= GSS_C_CALLING_ERROR_OFFSET; + if (v == 0) return ""; else if (v >= sizeof(msgs)/sizeof(*msgs)) @@ -84,6 +86,8 @@ routine_error(OM_uint32 v) "The provided name was not a mechanism name.", }; + v >>= GSS_C_ROUTINE_ERROR_OFFSET; + if (v == 0) return ""; else if (v >= sizeof(msgs)/sizeof(*msgs))