From 8ea72cc3a2dcce151c07283c058079ea7178f0dc Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Wed, 26 Aug 2009 06:06:47 +0000 Subject: [PATCH] cleanup git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/authdata@22612 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/mechglue/g_imp_name.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/gssapi/mechglue/g_imp_name.c b/src/lib/gssapi/mechglue/g_imp_name.c index 534e078381..6137b9825f 100644 --- a/src/lib/gssapi/mechglue/g_imp_name.c +++ b/src/lib/gssapi/mechglue/g_imp_name.c @@ -176,8 +176,6 @@ allocation_failure: /* * GSS export name constants */ -static const char *expNameTokId = "\x04\x01"; -static const char *expNameCompositeTokId = "\x04\x02"; static const unsigned int expNameTokIdLen = 2; static const unsigned int mechOidLenLen = 2; static const unsigned int nameTypeLenLen = 2; @@ -202,8 +200,9 @@ importExportName(minor, unionName) return (GSS_S_DEFECTIVE_TOKEN); buf = (unsigned char *)expName.value; - if (memcmp(expNameTokId, buf, expNameTokIdLen) != 0 && - memcmp(expNameCompositeTokId, buf, expNameTokIdLen) != 0) + if (buf[0] != 0x04) + return (GSS_S_DEFECTIVE_TOKEN); + if (buf[1] != 0x01 && buf[1] != 0x02) return (GSS_S_DEFECTIVE_TOKEN); buf += expNameTokIdLen; -- 2.47.2