smb: fix invalid username check in smb3_fs_context_parse_param()

[ Upstream commit ed6612165b ]

Since the maximum return value of strnlen(..., CIFS_MAX_USERNAME_LEN)
is CIFS_MAX_USERNAME_LEN, length check in smb3_fs_context_parse_param()
is always FALSE and invalid.

Fix the comparison in if statement.

Signed-off-by: Yiqi Sun <sunyiqixm@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Yiqi Sun 2025-11-11 15:05:39 +08:00 • committed by Greg Kroah-Hartman
commit ef9b1e6b8f