]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Fix invalid check in __cifs_calc_signature()
authorPaulo Alcantara <paulo@paulo.ac>
Fri, 15 Jun 2018 18:58:00 +0000 (15:58 -0300)
committerSteve French <stfrench@microsoft.com>
Sat, 16 Jun 2018 00:17:40 +0000 (19:17 -0500)
commitb90d45fdae21e025ea2c588a27291f5255c1946c
treea6118338b9763022fb49934c1d27bde6f9e97747
parent34c22b0cdbb27127d1e83841bf7de5c75c5bc49a
cifs: Fix invalid check in __cifs_calc_signature()

The following check would never evaluate to true:
  > if (i == 0 && iov[0].iov_len <= 4)

Because 'i' always starts at 1.

This patch fixes it and also move the header checks outside the for loop
- which makes more sense.

Signed-off-by: Paulo Alcantara <palcantara@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsencrypt.c