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

source3/rpc_server/spoolss/srv_spoolss_util.c

index 896a9ed7c5aae02a977837b4cf2cb66e27b14d38..049abe40fd374fdb262c9772e82e679f41e79cfe 100644 (file)
@@ -3232,7 +3232,7 @@ WERROR winreg_printer_setform1(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, };
        DATA_BLOB blob;
        uint32_t num_builtin = ARRAY_SIZE(builtin_forms1);
        uint32_t i;