]> Gentwo Git Trees - linux/.git/commit
smb: fix invalid username check in smb3_fs_context_parse_param()
authorYiqi Sun <sunyiqixm@gmail.com>
Tue, 11 Nov 2025 07:05:39 +0000 (15:05 +0800)
committerSteve French <stfrench@microsoft.com>
Tue, 11 Nov 2025 16:01:47 +0000 (10:01 -0600)
commited6612165b74f09db00ef0abaf9831895ab28b7f
tree0f67ad498d2c49771b6663262b714f3783acd040
parente8c73eb7db0a498cd4b22d2819e6ab1a6f506bd6
smb: fix invalid username check in smb3_fs_context_parse_param()

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>
fs/smb/client/fs_context.c