Fix ubsan null pointer passed as argument 2
commit412afb2aef100e09eb433b8f0cae064fc2a736b7
authorGary Lockyer <gary@catalyst.net.nz>
Thu, 23 May 2019 23:00:05 +0000 (24 11:00 +1200)
committerGary Lockyer <gary@samba.org>
Mon, 27 May 2019 01:29:48 +0000 (27 01:29 +0000)
tree2a3eedf4bbb4bc450d31652a7d765762237c4807
parentda87fa998ab71328f30bcdf5b41aee8675aee48a
Fix ubsan null pointer passed as argument 2

Fix ubsan warning null pointer passed as argument 2 when the source
pointer is NULL.  The calls to memcpy are now guarded by an
if (len > 0)

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Mon May 27 01:29:48 UTC 2019 on sn-devel-184
12 files changed:
lib/crypto/aes_cmac_128.c
lib/dbwrap/dbwrap_rbt.c
lib/util/asn1.c
lib/util/iov_buf.c
source3/locking/brlock.c
source3/smbd/trans2.c
source4/libcli/raw/raweas.c
source4/libcli/raw/rawfile.c
source4/libcli/raw/rawrequest.c
source4/libcli/raw/rawtrans.c
source4/ntvfs/common/brlock_tdb.c
source4/smb_server/smb/nttrans.c