Skip to content

Commit 9621b99

Browse files
ZhangGuoDongsmfrench
authored andcommitted
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: b1bc187 ("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>
1 parent 12c43a0 commit 9621b99

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/smb/client/smb2pdu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3996,7 +3996,7 @@ SMB311_posix_query_info(const unsigned int xid, struct cifs_tcon *tcon,
39963996
u64 persistent_fid, u64 volatile_fid,
39973997
struct smb311_posix_qinfo *data, u32 *plen)
39983998
{
3999-
size_t output_len = sizeof(struct smb311_posix_qinfo *) +
3999+
size_t output_len = sizeof(struct smb311_posix_qinfo) +
40004000
(sizeof(struct smb_sid) * 2) + (PATH_MAX * 2);
40014001
*plen = 0;
40024002

0 commit comments

Comments
 (0)