mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
s4:torture: Initialize union smb_open
"Error: UNINIT (CWE-457): samba-4.20.0rc2/source4/torture/raw/open.c:1136: var_decl: Declaring variable ""io1"" without initializer. samba-4.20.0rc2/source4/torture/raw/open.c:1198: uninit_use_in_call: Using uninitialized value ""io1.ntcreatex.out.file.fnum"" when calling ""smbcli_close"". 1196| done: 1197| smbcli_close(cli->tree, io.ntcreatex.out.file.fnum); 1198|-> smbcli_close(cli->tree, io1.ntcreatex.out.file.fnum); 1199| smbcli_deltree(cli->tree, BASEDIR); 1200| return ret;" Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
parent
3aa6aa02a8
commit
ae47ec172f
@ -1133,7 +1133,7 @@ done:
|
|||||||
*/
|
*/
|
||||||
static bool test_ntcreatex_brlocked(struct torture_context *tctx, struct smbcli_state *cli)
|
static bool test_ntcreatex_brlocked(struct torture_context *tctx, struct smbcli_state *cli)
|
||||||
{
|
{
|
||||||
union smb_open io, io1;
|
union smb_open io = {}, io1 = {};
|
||||||
union smb_lock io2;
|
union smb_lock io2;
|
||||||
struct smb_lock_entry lock[1];
|
struct smb_lock_entry lock[1];
|
||||||
const char *fname = BASEDIR "\\torture_ntcreatex.txt";
|
const char *fname = BASEDIR "\\torture_ntcreatex.txt";
|
||||||
|
Loading…
Reference in New Issue
Block a user