提交 54ec3d46 编写于 作者: J J. Bruce Fields 提交者: Trond Myklebust

gss_krb5: Don't expect blocksize to always be 8 when calculating padding

Signed-off-by: NSteve Dickson <steved@redhat.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 7561042f
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册