s3: Fix Coverity ID 2287: Uninitialized read
authorVolker Lendecke <vl@samba.org>
Tue, 15 Mar 2011 09:54:59 +0000 (10:54 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 15 Mar 2011 10:10:43 +0000 (11:10 +0100)
We passed the structure including the uninitialized elements to
dcerpc_winreg_CreateKey.

source3/services/svc_winreg_glue.c

index 65f03881674a319ba3ee5b80e7cba5db21b467df..dc367c2c41d9b4bd787517fff63284609adfcf04 100644 (file)
@@ -197,7 +197,7 @@ bool svcctl_set_secdesc(struct messaging_context *msg_ctx,
 
        {
                enum winreg_CreateAction action = REG_ACTION_NONE;
-               struct winreg_String wkey;
+               struct winreg_String wkey = { 0, };
                struct winreg_String wkeyclass;
 
                wkey.name = talloc_asprintf(tmp_ctx, "%s\\Security", key);