diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-06-19 10:19:38 +0200 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-06-28 22:58:28 -0500 |
commit | 9cedc58bdbe9fff9aacd0ca19ee5777659f28fd7 (patch) | |
tree | de0f05648330fa19e85aaafc10c9a3ff4826012b /fs/binfmt_misc.c | |
parent | 11d5e2061e973a8d4ff2b95a114b4b8ef8652633 (diff) |
ksmbd: avoid field overflow warning
clang warns about a possible field overflow in a memcpy:
In file included from fs/smb/server/smb_common.c:7:
include/linux/fortify-string.h:583:4: error: call to '__write_overflow_field' declared with 'warning' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror,-Wattribute-warning]
__write_overflow_field(p_size_field, size);
It appears to interpret the "&out[baselen + 4]" as referring to a single
byte of the character array, while the equivalen "out + baselen + 4" is
seen as an offset into the array.
I don't see that kind of warning elsewhere, so just go with the simple
rework.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/binfmt_misc.c')
0 files changed, 0 insertions, 0 deletions