From e4b60e92d4f878b774eca22fa4c00fa04f6354b4 Mon Sep 17 00:00:00 2001 From: Namjae Jeon Date: Fri, 16 Jul 2021 14:51:30 +0900 Subject: ksmbd: fix wrong compression context size Use smb2_compression_ctx instead of smb2_encryption_neg_context. Signed-off-by: Namjae Jeon Signed-off-by: Steve French --- fs/ksmbd/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/ksmbd') diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c index c1a594599431..f9e6e2bd4cbf 100644 --- a/fs/ksmbd/smb2pdu.c +++ b/fs/ksmbd/smb2pdu.c @@ -924,7 +924,7 @@ static int decode_compress_ctxt(struct ksmbd_conn *conn, * Return compression context size in request. * So need to plus extra number of CompressionAlgorithms size. */ - return sizeof(struct smb2_encryption_neg_context) + + return sizeof(struct smb2_compression_ctx) + ((algo_cnt - 1) * 2); } -- cgit v1.2.3