Skip to content

Commit

Permalink
gss_krb5: Don't expect blocksize to always be 8 when calculating padding
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Dickson <steved@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
J. Bruce Fields authored and Trond Myklebust committed May 14, 2010
1 parent 7561042 commit 54ec3d4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/sunrpc/auth_gss/gss_krb5_wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
static inline int
gss_krb5_padding(int blocksize, int length)
{
/* Most of the code is block-size independent but currently we
* use only 8: */
BUG_ON(blocksize != 8);
return 8 - (length & 7);
return blocksize - (length % blocksize);
}

static inline void
Expand Down

0 comments on commit 54ec3d4

Please sign in to comment.