]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sunrpc/auth_gss/gss_generic_token.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[linux-2.6-omap-h63xx.git] / net / sunrpc / auth_gss / gss_generic_token.c
index 826df44e7fca15dfdb2f640e5dfc84f872ddb2ce..ea8c92ecdae5294834253f552fb8f1523501bc5d 100644 (file)
@@ -11,7 +11,7 @@
 
 /*
  * Copyright 1993 by OpenVision Technologies, Inc.
- * 
+ *
  * Permission to use, copy, modify, distribute, and sell this software
  * and its documentation for any purpose is hereby granted without fee,
  * provided that the above copyright notice appears in all copies and
@@ -21,7 +21,7 @@
  * without specific, written prior permission. OpenVision makes no
  * representations about the suitability of this software for any
  * purpose.  It is provided "as is" without express or implied warranty.
- * 
+ *
  * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
@@ -201,7 +201,7 @@ g_verify_token_header(struct xdr_netobj *mech, int *body_size,
                return(G_BAD_TOK_HEADER);
        if (*buf++ != 0x06)
                return(G_BAD_TOK_HEADER);
+
        if ((toksize-=1) < 0)
                return(G_BAD_TOK_HEADER);
        toid.len = *buf++;
@@ -211,9 +211,9 @@ g_verify_token_header(struct xdr_netobj *mech, int *body_size,
        toid.data = buf;
        buf+=toid.len;
 
-       if (! g_OID_equal(&toid, mech)) 
+       if (! g_OID_equal(&toid, mech))
                ret = G_WRONG_MECH;
+
    /* G_WRONG_MECH is not returned immediately because it's more important
       to return G_BAD_TOK_HEADER if the token header is in fact bad */