From: Marc Horowitz Date: Mon, 3 Aug 1998 05:32:29 +0000 (+0000) Subject: Return G_WRONG_TOKID if the passed-in token id is different from the X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d706d31c8809dee81dedccddfa02007b3d2f04e8;p=thirdparty%2Fkrb5.git Return G_WRONG_TOKID if the passed-in token id is different from the id in the token. git-svn-id: svn://anonsvn.mit.edu/krb5/branches/marc-3des@10770 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/generic/util_token.c b/src/lib/gssapi/generic/util_token.c index 627b5011bc..9e186a1538 100644 --- a/src/lib/gssapi/generic/util_token.c +++ b/src/lib/gssapi/generic/util_token.c @@ -205,9 +205,12 @@ gss_int32 g_verify_token_header(mech, body_size, buf_in, tok_type, toksize) if ((toksize-=2) < 0) return(G_BAD_TOK_HEADER); + if (ret) + return(ret); + if ((*buf++ != ((tok_type>>8)&0xff)) || - (*buf++ != (tok_type&0xff))) - return(G_BAD_TOK_HEADER); + (*buf++ != (tok_type&0xff))) + return(G_WRONG_TOKID); if (!ret) { *buf_in = buf;