mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
smb/client: fix buffer size for smb311_posix_qinfo in SMB311_posix_query_info()
[ Upstream commit9621b996e4] SMB311_posix_query_info() is currently unused, but it may still be used in some stable versions, so these changes are submitted as a separate patch. Use `sizeof(struct smb311_posix_qinfo)` instead of sizeof its pointer, so the allocated buffer matches the actual struct size. Fixes:b1bc1874b8("smb311: Add support for SMB311 query info (non-compounded)") Reported-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: ZhangGuoDong <zhangguodong@kylinos.cn> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
99acd1ea34
commit
db93ff008d
@@ -3927,7 +3927,7 @@ int
|
||||
SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon,
|
||||
u64 persistent_fid, u64 volatile_fid, struct smb311_posix_qinfo *data, u32 *plen)
|
||||
{
|
||||
size_t output_len = sizeof(struct smb311_posix_qinfo *) +
|
||||
size_t output_len = sizeof(struct smb311_posix_qinfo) +
|
||||
(sizeof(struct smb_sid) * 2) + (PATH_MAX * 2);
|
||||
*plen = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user