summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2020-10-28 15:05:34 +0100
committerKarolin Seeger <kseeger@samba.org>2020-10-30 13:53:37 +0000
commitdbba939ce50627c32df0b7ee0707be1ea1a7623c (patch)
tree1170210e80a10d77e24cf9279bb3ee0e0cf1d230 /source4
parente424e1d65e439460783bce4a32b723bc45fb5f2e (diff)
downloadsamba-dbba939ce50627c32df0b7ee0707be1ea1a7623c.tar.gz
s4:torture: Pass buffer correctly to write()
../../source4/torture/basic/denytest.c: In function ‘torture_createx_specific.isra’: ../../source4/torture/basic/denytest.c:2372:9: error: ‘write’ reading 56 bytes from a region of size 8 [-Werror=stringop-overflow=] 2372 | res = write(data_file_fd, &cxd, cxd_len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ BUG: https://bugzilla.samba.org/show_bug.cgi?id=14555 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 5f92ec6988d2f4c20eab9449cbe17317588f6634) Autobuild-User(v4-13-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-13-test): Fri Oct 30 13:53:37 UTC 2020 on sn-devel-184
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/basic/denytest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/torture/basic/denytest.c b/source4/torture/basic/denytest.c
index 1c946b81b92..8e7a822df09 100644
--- a/source4/torture/basic/denytest.c
+++ b/source4/torture/basic/denytest.c
@@ -2369,7 +2369,7 @@ static bool torture_createx_specific(struct torture_context *tctx, struct
if (data_file_fd >= 0) {
size_t cxd_len = sizeof(struct createx_data);
found = true;
- res = write(data_file_fd, &cxd, cxd_len);
+ res = write(data_file_fd, cxd, cxd_len);
if (res != cxd_len) {
torture_result(tctx, TORTURE_FAIL,
"(%s): write failed: %s!",