aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifs_unicode.c
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2022-10-04 20:51:39 -0500
committerSteve French <stfrench@microsoft.com>2022-10-05 17:42:38 -0500
commit943deb6066538aeb5417eae5fdc222defdcb9949 (patch)
tree6fa5e018fca65ea0bb8e3dcb7ec39ac8495d8e24 /fs/cifs/cifs_unicode.c
parentsmb3: do not log confusing message when server returns no network interfaces (diff)
downloadlinux-dev-943deb6066538aeb5417eae5fdc222defdcb9949.tar.xz
linux-dev-943deb6066538aeb5417eae5fdc222defdcb9949.zip
cifs: Replace a couple of one-element arrays with flexible-array members
One-element arrays are deprecated, and we are replacing them with flexible array members instead. So, replace one-element arrays with flexible-array member in structs negotiate_req and extended_response, and refactor the rest of the code, accordingly. Also, make use of the DECLARE_FLEX_ARRAY() helper to declare flexible array member EncryptionKey in union u. This new helper allows for flexible-array members in unions. Change pointer notation to proper array notation in a call to memcpy() where flexible-array member DialectsArray is being used as destination argument. Important to mention is that doing a build before/after this patch results in no binary output differences. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help us make progress towards globally enabling -fstrict-flex-arrays=3 [1]. Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/229 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 [1] Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifs_unicode.c')
0 files changed, 0 insertions, 0 deletions