aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2007-12-30 23:56:21 -0500
committerSteve French <sfrench@us.ibm.com>2007-12-30 23:56:21 -0500
commit28c5a02a11f70bb1fd8dd3b633206e2db3220308 (patch)
tree024b972b94ff1045b3c88bd3a04411a00e758342 /fs/cifs
parentbb5a9a04d4cab4b13d63ac5cd3e1fb35f9583607 (diff)
[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: Jeff Layton <jlayton@tupile.poochiereds.net> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/sess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index ce698d5f6107..d2153abcba6d 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -542,7 +542,7 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time,
542 542
543 if (ses->capabilities & CAP_UNICODE) { 543 if (ses->capabilities & CAP_UNICODE) {
544 /* unicode strings must be word aligned */ 544 /* unicode strings must be word aligned */
545 if (iov[0].iov_len % 2) { 545 if ((iov[0].iov_len + iov[1].iov_len) % 2) {
546 *bcc_ptr = 0; 546 *bcc_ptr = 0;
547 bcc_ptr++; 547 bcc_ptr++;
548 } 548 }