diff options
author | Thorsten Blum <thorsten.blum@toblux.com> | 2024-08-20 21:15:20 +0200 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-09-21 05:16:11 +0200 |
commit | 8bb04fb2b7e346ffcf00164b91129ab151ceaa46 (patch) | |
tree | 4b1747c4e84619e110bdcd307403e58b2fb14535 /fs/smb/server/smb2pdu.c | |
parent | ksmbd: fix warning: comparison of distinct pointer types lacks a cast (diff) | |
download | linux-8bb04fb2b7e346ffcf00164b91129ab151ceaa46.tar.xz linux-8bb04fb2b7e346ffcf00164b91129ab151ceaa46.zip |
ksmbd: Replace one-element arrays with flexible-array members
Replace the deprecated one-element arrays with flexible-array members
in the structs copychunk_ioctl_req and smb2_ea_info_req.
There are no binary differences after this conversion.
Link: https://github.com/KSPP/linux/issues/79
Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/server/smb2pdu.c')
-rw-r--r-- | fs/smb/server/smb2pdu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c index 28cd66fa8e05..7121266daa02 100644 --- a/fs/smb/server/smb2pdu.c +++ b/fs/smb/server/smb2pdu.c @@ -4587,7 +4587,7 @@ static int smb2_get_ea(struct ksmbd_work *work, struct ksmbd_file *fp, path = &fp->filp->f_path; /* single EA entry is requested with given user.* name */ if (req->InputBufferLength) { - if (le32_to_cpu(req->InputBufferLength) < + if (le32_to_cpu(req->InputBufferLength) <= sizeof(struct smb2_ea_info_req)) return -EINVAL; @@ -8091,7 +8091,7 @@ int smb2_ioctl(struct ksmbd_work *work) goto out; } - if (in_buf_len < sizeof(struct copychunk_ioctl_req)) { + if (in_buf_len <= sizeof(struct copychunk_ioctl_req)) { ret = -EINVAL; goto out; } |