提交 28c5a02a 编写于 作者: J Jeff Layton 提交者: Steve French

[CIFS] fix unicode string alignment in SPNEGO setup

Unicode strings need to be word aligned, but the code that handles that
is currently not taking the length of the SPNEGO blob into account. Fix
it to do so.
Signed-off-by: NJeff Layton <jlayton@tupile.poochiereds.net>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 bb5a9a04
......@@ -542,7 +542,7 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
if (ses->capabilities & CAP_UNICODE) {
/* unicode strings must be word aligned */
if (iov[0].iov_len % 2) {
if ((iov[0].iov_len + iov[1].iov_len) % 2) {
*bcc_ptr = 0;
bcc_ptr++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册