From: Noel Power Date: Mon, 18 Apr 2016 18:12:27 +0000 (+0100) Subject: s4:torture:smb2: fix Use of 'uninitialised value of size 8' valgrind error. X-Git-Tag: talloc-2.1.7~159 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ae19203e265a679cae8284605a4a8b658a42fa4;p=thirdparty%2Fsamba.git s4:torture:smb2: fix Use of 'uninitialised value of size 8' valgrind error. smbtorture test smb2.create.aclfile.aclfile produces the following valgrind trace ==6025== Use of uninitialised value of size 8 ==6025== at 0xFB0B061: _itoa_word (in /lib64/libc-2.19.so) ==6025== by 0xFB0EAD2: vfprintf (in /lib64/libc-2.19.so) ==6025== by 0xFB36712: vasprintf (in /lib64/libc-2.19.so) ==6025== by 0xAEBB348: ndr_print_debug_helper (ndr.c:314) ==6025== by 0xAEB8ED1: ndr_print_uint16 (ndr_basic.c:1055) ==6025== by 0x3E5951: ndr_print_security_ace (ndr_security.c:539) ==6025== by 0x3E6251: ndr_print_security_acl (ndr_security.c:642) ==6025== by 0x3E7A76: ndr_print_security_descriptor (ndr_security.c:890) ==6025== by 0xAEBB860: ndr_print_debug (ndr.c:409) ==6025== by 0x45FCB6: smb2_util_verify_sd (util.c:598) ==6025== by 0x502246: test_create_acl_ext (create.c:634) ==6025== by 0x506E13: test_create_acl_file (create.c:1232) ==6025== by 0x48B420: wrap_simple_1smb2_test (smb2.c:52) ==6025== by 0x955368F: internal_torture_run_test (torture.c:442) ==6025== by 0x9553A6B: torture_run_test_restricted (torture.c:542) ==6025== by 0x26013F: run_matching (smbtorture.c:110) ==6025== by 0x260001: run_matching (smbtorture.c:95) ==6025== by 0x260001: run_matching (smbtorture.c:95) ==6025== by 0x260260: torture_run_named_tests (smbtorture.c:143) ==6025== by 0x261EDF: main (smbtorture.c:665) ==6025== ==6025== Conditional jump or move depends on uninitialised value(s) ==6025== at 0xFB0B068: _itoa_word (in /lib64/libc-2.19.so) ==6025== by 0xFB0EAD2: vfprintf (in /lib64/libc-2.19.so) ==6025== by 0xFB36712: vasprintf (in /lib64/libc-2.19.so) ==6025== by 0xAEBB348: ndr_print_debug_helper (ndr.c:314) ==6025== by 0xAEB8ED1: ndr_print_uint16 (ndr_basic.c:1055) ==6025== by 0x3E5951: ndr_print_security_ace (ndr_security.c:539) ==6025== by 0x3E6251: ndr_print_security_acl (ndr_security.c:642) ==6025== by 0x3E7A76: ndr_print_security_descriptor (ndr_security.c:890) ==6025== by 0xAEBB860: ndr_print_debug (ndr.c:409) ==6025== by 0x45FCB6: smb2_util_verify_sd (util.c:598) ==6025== by 0x502246: test_create_acl_ext (create.c:634) ==6025== by 0x506E13: test_create_acl_file (create.c:1232) ==6025== by 0x48B420: wrap_simple_1smb2_test (smb2.c:52) ==6025== by 0x955368F: internal_torture_run_test (torture.c:442) ==6025== by 0x9553A6B: torture_run_test_restricted (torture.c:542) ==6025== by 0x26013F: run_matching (smbtorture.c:110) ==6025== by 0x260001: run_matching (smbtorture.c:95) ==6025== by 0x260001: run_matching (smbtorture.c:95) ==6025== by 0x260260: torture_run_named_tests (smbtorture.c:143) ==6025== by 0x261EDF: main (smbtorture.c:665) ==6025== Signed-off-by: Noel Power Reviewed-by: Volker Lendecke Reviewed-by: Andreas Schneider --- diff --git a/source4/torture/smb2/create.c b/source4/torture/smb2/create.c index 1275aa81cda..7e6be8d8473 100644 --- a/source4/torture/smb2/create.c +++ b/source4/torture/smb2/create.c @@ -578,6 +578,8 @@ static bool test_create_acl_ext(struct torture_context *tctx, struct smb2_tree * NTSTATUS (*delete_func)(struct smb2_tree *, const char *) = test_dir ? smb2_util_rmdir : smb2_util_unlink; + ZERO_STRUCT(ace); + smb2_deltree(tree, FNAME); ZERO_STRUCT(io);