1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-05 09:18:06 +03:00
samba-mirror/source3/nmbd
Andreas Schneider 8e7a62b6ff waf: Build nmbd with -Wno-error=stringop-overflow
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>
2023-08-28 02:04:36 +00:00
..
asyncdns.c s3:nmbd: Add missing newlines to logging messages 2023-08-08 04:39:38 +00:00
nmbd_become_dmb.c s3:nmbd: Fix code spelling 2023-07-17 12:41:21 +00:00
nmbd_become_lmb.c nmbd_become_lmb.c: Fix debug message formatting 2023-08-08 04:39:37 +00:00
nmbd_browserdb.c s3: safe_string: do not include string_wrappers.h 2020-08-28 00:56:34 +00:00
nmbd_browsesync.c s3:nmbd: Fix code spelling 2023-07-17 12:41:21 +00:00
nmbd_elections.c s3: safe_string: do not include string_wrappers.h 2020-08-28 00:56:34 +00:00
nmbd_incomingdgrams.c s3:nmbd: Fix code spelling 2023-07-17 12:41:21 +00:00
nmbd_incomingrequests.c s3:nmbd: Fix code spelling 2023-07-17 12:41:21 +00:00
nmbd_lmhosts.c s3:nmbd: Fix code spelling 2023-07-17 12:41:21 +00:00
nmbd_logonnames.c s3:nmbd: Fix code spelling 2023-07-17 12:41:21 +00:00
nmbd_mynames.c s3:nmbd: Fix code spelling 2023-07-17 12:41:21 +00:00
nmbd_namelistdb.c s3:nmbd: Fix code spelling 2023-07-17 12:41:21 +00:00
nmbd_namequery.c
nmbd_nameregister.c s3:nmbd: Fix code spelling 2023-07-17 12:41:21 +00:00
nmbd_namerelease.c
nmbd_nodestatus.c
nmbd_packets.c s3: safe_string: do not include string_wrappers.h 2020-08-28 00:56:34 +00:00
nmbd_processlogon.c Convert all uses of uint8/16/32 to _t in nmbd and the include file. 2015-05-01 19:15:10 +02:00
nmbd_proto.h nmbd: Move my_netbios_names() to nmbd 2021-03-16 17:09:32 +00:00
nmbd_responserecordsdb.c s3:nmbd: Fix code spelling 2023-07-17 12:41:21 +00:00
nmbd_sendannounce.c nmbd_sendannounce.c: use DBG* macros instead of static log level numbers 2023-06-16 20:28:29 +00:00
nmbd_serverlistdb.c s3: safe_string: do not include string_wrappers.h 2020-08-28 00:56:34 +00:00
nmbd_subnetdb.c nmbd: Reduce the wait interface loop sleep time 2021-05-14 20:52:47 +00:00
nmbd_synclists.c source3: move lib/substitute.c functions out of proto.h 2021-11-11 13:49:32 +00:00
nmbd_winsproxy.c s3:nmbd: Fix code spelling 2023-07-17 12:41:21 +00:00
nmbd_winsserver.c s3:nmbd: Add missing newlines to logging messages 2023-08-08 04:39:38 +00:00
nmbd_workgroupdb.c s3: safe_string: do not include string_wrappers.h 2020-08-28 00:56:34 +00:00
nmbd.c s3:nmbd: Add missing newlines to logging messages 2023-08-08 04:39:38 +00:00
nmbd.h nmbd: Reduce the wait interface loop sleep time 2021-05-14 20:52:47 +00:00
wscript_build waf: Build nmbd with -Wno-error=stringop-overflow 2023-08-28 02:04:36 +00:00