s4:torture:smb2: fix Use of 'uninitialised value of size 8' valgrind error.
authorNoel Power <noel.power@suse.com>
Mon, 18 Apr 2016 18:12:27 +0000 (19:12 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 25 Apr 2016 08:35:15 +0000 (10:35 +0200)
commit1ae19203e265a679cae8284605a4a8b658a42fa4
treeb5ad8354857af69726a9dffe789560a1e2ffe347
parentcd7c57c85d9f3f6c27f28c120269f67e6d1ee45f
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 <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source4/torture/smb2/create.c