From: Luke Howard Date: Wed, 26 Aug 2009 06:06:47 +0000 (+0000) Subject: cleanup X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ea72cc3a2dcce151c07283c058079ea7178f0dc;p=thirdparty%2Fkrb5.git cleanup git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/authdata@22612 dc483132-0cff-0310-8789-dd5450dbe970 --- 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;