Skip to content

Commit

Permalink
ksmbd: Replace one-element array with flexible-array member
Browse files Browse the repository at this point in the history
One-element arrays are deprecated, and we are replacing them with flexible
array members instead. So, replace one-element array with flexible-array
member in struct smb_negotiate_req.

This results in no differences in binary output.

Link: KSPP/linux#79
Link: KSPP/linux#317
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
GustavoARSilva authored and Steve French committed Jun 26, 2023
1 parent 5211cc8 commit 11d5e20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/smb/server/smb_common.h
Expand Up @@ -200,7 +200,7 @@ struct smb_hdr {
struct smb_negotiate_req {
struct smb_hdr hdr; /* wct = 0 */
__le16 ByteCount;
unsigned char DialectsArray[1];
unsigned char DialectsArray[];
} __packed;

struct smb_negotiate_rsp {
Expand Down

0 comments on commit 11d5e20

Please sign in to comment.