mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-22 06:12:22 +00:00
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:
|
||
|---|---|---|
| .. | ||
| mgmt | ||
| asn1.c | ||
| asn1.h | ||
| auth.c | ||
| auth.h | ||
| connection.c | ||
| connection.h | ||
| crypto_ctx.c | ||
| crypto_ctx.h | ||
| glob.h | ||
| Kconfig | ||
| ksmbd_netlink.h | ||
| ksmbd_spnego_negtokeninit.asn1 | ||
| ksmbd_spnego_negtokentarg.asn1 | ||
| ksmbd_work.c | ||
| ksmbd_work.h | ||
| Makefile | ||
| misc.c | ||
| misc.h | ||
| ndr.c | ||
| ndr.h | ||
| nterr.h | ||
| ntlmssp.h | ||
| oplock.c | ||
| oplock.h | ||
| server.c | ||
| server.h | ||
| smb2misc.c | ||
| smb2ops.c | ||
| smb2pdu.c | ||
| smb2pdu.h | ||
| smb_common.c | ||
| smb_common.h | ||
| smbacl.c | ||
| smbacl.h | ||
| smbfsctl.h | ||
| smbstatus.h | ||
| transport_ipc.c | ||
| transport_ipc.h | ||
| transport_rdma.c | ||
| transport_rdma.h | ||
| transport_tcp.c | ||
| transport_tcp.h | ||
| unicode.c | ||
| unicode.h | ||
| uniupr.h | ||
| vfs_cache.c | ||
| vfs_cache.h | ||
| vfs.c | ||
| vfs.h | ||
| xattr.h | ||