s3: Fix Coverity ID 2283: Uninitialized read
authorVolker Lendecke <vl@samba.org>
Tue, 15 Mar 2011 10:02:57 +0000 (11:02 +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_OpenKey.

source3/rpc_server/spoolss/srv_spoolss_util.c

index 5f614f1a8d308f8da3c18a1f620ba5cf5d2b8c26..6ed6f342b5fe8584a1a12ed598af934e0c2c461b 100644 (file)
@@ -3149,7 +3149,7 @@ WERROR winreg_printer_deleteform1(TALLOC_CTX *mem_ctx,
        uint32_t access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
        struct dcerpc_binding_handle *winreg_handle = NULL;
        struct policy_handle hive_hnd, key_hnd;
-       struct winreg_String wvalue;
+       struct winreg_String wvalue = { 0, };
        uint32_t num_builtin = ARRAY_SIZE(builtin_forms1);
        uint32_t i;
        WERROR result = WERR_OK;