[SCM] Samba Shared Repository - branch v3-6-test updated

Volker Lendecke vlendec at samba.org
Tue Mar 15 05:55:41 MDT 2011


The branch, v3-6-test has been updated
       via  d46bcbc libwbclient: CID 2199 -- NULL pointer return
       via  62a0c43 s3: Fix Coverity ID 2278: Uninitialized read
       via  c7ce5ab s3: Fix Coverity ID 2279: Uninitialized read
       via  2f47d98 s3: Fix Coverity ID 2280: Uninitialized read
       via  8648c1d s3: Fix Coverity ID 2281: Uninitialized read
       via  fe73713 s3: Fix Coverity ID 2282: Uninitialized read
       via  cbd4789 s3: Fix Coverity ID 2283: Uninitialized read
       via  8588a57 s3: Fix Coverity ID 2284: Uninitialized read
       via  b6d2dcc s3: Fix Coverity ID 2285: Uninitialized read
       via  64af40a s3: Fix Coverity ID 2286: Uninitialized read
       via  93c28da s3: Fix Coverity ID 2287: Uninitialized read
       via  ae42a69 s3: Fix Coverity ID 2288: Uninitialized read
       via  3055c56 s3: Fix Coverity ID 2289: Uninitialized read
       via  ee92f13 s3: Fix Coverity ID 2290: Uninitialized read
      from  5f2aeb6 Re-enable base.tcondev test for S3, now we pass it correctly. (cherry picked from commit 349731fd32910e85558be1af645f891edd005a80)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit d46bcbcd281e8d878ad0e473dbb5b050bb07f0c3
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 11:19:57 2011 +0100

    libwbclient: CID 2199 -- NULL pointer return
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Tue Mar 15 12:08:48 CET 2011 on sn-devel-104

commit 62a0c43dc86f1800e537f116dee283a6c6cd5f48
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 11:09:26 2011 +0100

    s3: Fix Coverity ID 2278: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_SetValue.

commit c7ce5abace50a5b079aca5a1a18f916576e57bd2
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 11:08:12 2011 +0100

    s3: Fix Coverity ID 2279: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_SetValue.

commit 2f47d98a7ea8ceeee743d8d639119656bca231b7
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 11:06:49 2011 +0100

    s3: Fix Coverity ID 2280: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_SetValue.

commit 8648c1dff6ee1a460c37115411790749913f1128
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 11:05:48 2011 +0100

    s3: Fix Coverity ID 2281: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_SetValue.

commit fe73713ffc6d382bb67ea0d9aec217e024606d70
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 11:04:23 2011 +0100

    s3: Fix Coverity ID 2282: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_SetValue.

commit cbd4789f8632ee3a758632d69c1ce9001929ce75
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 11:02:57 2011 +0100

    s3: Fix Coverity ID 2283: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_OpenKey.

commit 8588a5738800dc739935c1e346ada9b24b014769
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 11:00:13 2011 +0100

    s3: Fix Coverity ID 2284: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_DeleteValue.

commit b6d2dcc7de20e98bfa3a5d3fd3166e29bc77f55a
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 10:58:55 2011 +0100

    s3: Fix Coverity ID 2285: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_DeleteValue.

commit 64af40a3830f1c376dfc51f284f53fc3b81cea2c
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 10:56:37 2011 +0100

    s3: Fix Coverity ID 2286: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_SetValue.

commit 93c28da6f02f94ba53190f34ef5a1f6f91d2feb6
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 10:54:59 2011 +0100

    s3: Fix Coverity ID 2287: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_CreateKey.

commit ae42a69baac4651dccc1339d5d181521fc9f5124
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 10:52:49 2011 +0100

    s3: Fix Coverity ID 2288: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_SetValue.

commit 3055c560b640db2997e50b2e7f4d266ba5ba176c
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 10:49:00 2011 +0100

    s3: Fix Coverity ID 2289: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_OpenKey.

commit ee92f1344f5c47505aee24c6b4d2f0069c16ed8f
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 15 10:47:02 2011 +0100

    s3: Fix Coverity ID 2290: Uninitialized read
    
    We passed the structure including the uninitialized elements to
    dcerpc_winreg_DeleteKey.

-----------------------------------------------------------------------

Summary of changes:
 nsswitch/libwbclient/wbc_util.c               |    4 ++++
 source3/rpc_client/cli_winreg.c               |    8 ++++----
 source3/rpc_server/spoolss/srv_spoolss_util.c |   12 ++++++------
 source3/rpcclient/cmd_winreg.c                |    2 +-
 source3/services/svc_winreg_glue.c            |    2 +-
 source3/utils/net_rpc_registry.c              |    2 +-
 6 files changed, 17 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/libwbclient/wbc_util.c b/nsswitch/libwbclient/wbc_util.c
index d2783f3..6d7a96c 100644
--- a/nsswitch/libwbclient/wbc_util.c
+++ b/nsswitch/libwbclient/wbc_util.c
@@ -787,6 +787,10 @@ wbcErr wbcAddNamedBlob(size_t *num_blobs,
 		*num_blobs + 2, sizeof(struct wbcNamedBlob),
 		wbcNamedBlobDestructor);
 
+	if (blobs == NULL) {
+		return WBC_ERR_NO_MEMORY;
+	}
+
 	if (*pblobs != NULL) {
 		struct wbcNamedBlob *old = *pblobs;
 		memcpy(blobs, old, sizeof(struct wbcNamedBlob) * (*num_blobs));
diff --git a/source3/rpc_client/cli_winreg.c b/source3/rpc_client/cli_winreg.c
index c3f0c90..5b8635f 100644
--- a/source3/rpc_client/cli_winreg.c
+++ b/source3/rpc_client/cli_winreg.c
@@ -379,7 +379,7 @@ NTSTATUS dcerpc_winreg_set_dword(TALLOC_CTX *mem_ctx,
 				 uint32_t data,
 				 WERROR *pwerr)
 {
-	struct winreg_String wvalue;
+	struct winreg_String wvalue = { 0, };
 	DATA_BLOB blob;
 	WERROR result = WERR_OK;
 	NTSTATUS status;
@@ -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;
@@ -456,7 +456,7 @@ NTSTATUS dcerpc_winreg_set_expand_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;
@@ -538,7 +538,7 @@ NTSTATUS dcerpc_winreg_set_binary(TALLOC_CTX *mem_ctx,
 				  DATA_BLOB *data,
 				  WERROR *pwerr)
 {
-	struct winreg_String wvalue;
+	struct winreg_String wvalue = { 0, };
 	WERROR result = WERR_OK;
 	NTSTATUS status;
 
diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.c b/source3/rpc_server/spoolss/srv_spoolss_util.c
index 9d654ec..383552c 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_util.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_util.c
@@ -569,7 +569,7 @@ static WERROR winreg_printer_delete_subkeys(TALLOC_CTX *mem_ctx,
 	const char **subkeys = NULL;
 	uint32_t num_subkeys = 0;
 	struct policy_handle key_hnd;
-	struct winreg_String wkey;
+	struct winreg_String wkey = { 0, };
 	WERROR result = WERR_OK;
 	NTSTATUS status;
 	uint32_t i;
@@ -2228,7 +2228,7 @@ WERROR winreg_set_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;
@@ -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;
@@ -2931,7 +2931,7 @@ WERROR winreg_printer_addform1(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_info = 0;
 	union spoolss_FormInfo *info = NULL;
@@ -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;
@@ -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;
diff --git a/source3/rpcclient/cmd_winreg.c b/source3/rpcclient/cmd_winreg.c
index 2ba2d6d..e9508e3 100644
--- a/source3/rpcclient/cmd_winreg.c
+++ b/source3/rpcclient/cmd_winreg.c
@@ -156,7 +156,7 @@ static WERROR cmd_winreg_querymultiplevalues_ex(struct rpc_pipe_client *cli,
 	NTSTATUS status;
 	WERROR werr;
 	struct policy_handle handle, key_handle;
-	struct winreg_String key_name;
+	struct winreg_String key_name = { 0, };
 	struct dcerpc_binding_handle *b = cli->binding_handle;
 
 	struct QueryMultipleValue *values_in, *values_out;
diff --git a/source3/services/svc_winreg_glue.c b/source3/services/svc_winreg_glue.c
index 2b35556..ac1174b 100644
--- a/source3/services/svc_winreg_glue.c
+++ b/source3/services/svc_winreg_glue.c
@@ -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);
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c
index c98fc07..17c5d5a 100644
--- a/source3/utils/net_rpc_registry.c
+++ b/source3/utils/net_rpc_registry.c
@@ -1782,7 +1782,7 @@ static WERROR import_delete_key(struct import_ctx* ctx,
 	WERROR werr;
 	NTSTATUS status;
 	void* mem_ctx = talloc_new(ctx->mem_ctx);
-	struct winreg_String  keyname;
+	struct winreg_String  keyname = { 0, };
 	struct policy_handle  hive;
 	struct dcerpc_binding_handle *b = ctx->pipe_hnd->binding_handle;
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list