s3: Fix Coverity ID 2282: Uninitialized read
authorVolker Lendecke <vl@samba.org>
Tue, 15 Mar 2011 10:04:23 +0000 (11:04 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 15 Mar 2011 10:10:45 +0000 (11:10 +0100)
We passed the structure including the uninitialized elements to
dcerpc_winreg_SetValue.

source3/rpc_client/cli_winreg.c

index cf23c2a676dae798babebb25e44e1cec8127f550..3c8e4fe193e38701d429d813251887e55228a01a 100644 (file)
@@ -413,7 +413,7 @@ NTSTATUS dcerpc_winreg_set_sz(TALLOC_CTX *mem_ctx,
                              const char *data,
                              WERROR *pwerr)
 {
-       struct winreg_String wvalue;
+       struct winreg_String wvalue = { 0, };
        DATA_BLOB blob;
        WERROR result = WERR_OK;
        NTSTATUS status;