s3: Fix Coverity ID 2285: Uninitialized read
authorVolker Lendecke <vl@samba.org>
Tue, 15 Mar 2011 09:58:55 +0000 (10:58 +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_DeleteValue.

source3/rpc_server/spoolss/srv_spoolss_util.c

index 049abe40fd374fdb262c9772e82e679f41e79cfe..cfbe113c4992e9cc8b90a5cda8ee704bd4d4ba45 100644 (file)
@@ -2517,7 +2517,7 @@ WERROR winreg_delete_printer_dataex(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, };
        char *path;
        WERROR result = WERR_OK;
        NTSTATUS status;