Commit 9621b996 authored by ZhangGuoDong's avatar ZhangGuoDong Committed by Steve French
Browse files

smb/client: fix buffer size for smb311_posix_qinfo in SMB311_posix_query_info()



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: b1bc1874 ("smb311: Add support for SMB311 query info (non-compounded)")
Reported-by: default avatarChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: default avatarZhangGuoDong <zhangguodong@kylinos.cn>
Reviewed-by: default avatarChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 12c43a06
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3996,7 +3996,7 @@ 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;