mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
8e7a62b6ff
We use strlcpy() which has been added to glibc recently. This means we also get fortification for strlcpy() now: source3/nmbd/nmbd_browsesync.c: In function ‘find_domain_master_name_query_success’: source3/nmbd/nmbd_browsesync.c:337:9: warning: ‘strlcpy’ writing 257 bytes into a region of size 16 overflows the destination [-Wstringop-overflow=] 337 | strlcpy(userdata->data, work->work_group, size - sizeof(*userdata)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We allocate memory for the userdata struct + fstring. However the data pointer we use only is 16 bytes. Also nowadays you would use offsetof() for the allocation calculation, but it only works correctly on newer compilers like gcc > 7. We could make use of it in future after CentOS 7 is gone. As we don't want to touch nmbd anymore, just silence the warnings. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> |
||
---|---|---|
.. | ||
auth | ||
build | ||
client | ||
exports | ||
groupdb | ||
include | ||
intl | ||
lib | ||
libads | ||
libgpo/gpext | ||
libnet | ||
librpc | ||
libsmb | ||
locale | ||
locking | ||
modules | ||
nmbd | ||
param | ||
passdb | ||
printing | ||
profile | ||
registry | ||
rpc_client | ||
rpc_server | ||
rpcclient | ||
script | ||
selftest | ||
services | ||
smbd | ||
torture | ||
utils | ||
web | ||
winbindd | ||
.clang_complete | ||
.dmallocrc | ||
.indent.pro | ||
Doxyfile | ||
mainpage.dox | ||
smbadduser.in | ||
wscript | ||
wscript_build | ||
wscript_configure_system_ncurses |