1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/buildtools
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
..
bin third_party: Update waf to version 2.0.25 2023-01-06 14:02:35 +00:00
examples buildtools: Fix code spelling 2023-03-28 09:33:31 +00:00
scripts configure/Makefile: export PYTHONHASHSEED=1 in all 'configure/Makefile' scripts 2022-03-29 22:32:32 +00:00
wafsamba waf: Build nmbd with -Wno-error=stringop-overflow 2023-08-28 02:04:36 +00:00
compare_config_h4.sh buildtools: Reformat shell scripts 2022-02-22 15:23:35 +00:00
compare_generated.sh buildtools: Reformat shell scripts 2022-02-22 15:23:35 +00:00
compare_install.sh buildtools: Reformat shell scripts 2022-02-22 15:23:35 +00:00
devel_env.sh Move LSP stuff to buildtools/devel_env.sh 2022-04-01 11:20:35 +00:00
README Include waf as an extracted source directory, rather than as a one-in-a-file script. 2012-01-04 22:34:20 +01:00

See http://code.google.com/p/waf/ for more information on waf

You can get a svn copy of the upstream source with:

  svn checkout http://waf.googlecode.com/svn/trunk/ waf-read-only

Samba currently uses waf 1.5, which can be found at:

  http://waf.googlecode.com/svn/branches/waf-1.5

To update the current copy of waf, use the update-waf.sh script in this
directory.