[SCM] Samba Shared Repository - branch master updated - e92b7abca083de7acf03b0211ccc8ca935398794

Volker Lendecke vlendec at samba.org
Tue Jan 6 20:26:03 GMT 2009


The branch, master has been updated
       via  e92b7abca083de7acf03b0211ccc8ca935398794 (commit)
      from  05f97d32358168efdad111be9c36f61e011d4466 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e92b7abca083de7acf03b0211ccc8ca935398794
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jan 6 21:24:30 2009 +0100

    Add a NULL check and some const to dcerpc_floor_get_lhs_data()

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

Summary of changes:
 librpc/rpc/binding.c    |   10 ++++++++--
 source3/include/proto.h |    3 ++-
 2 files changed, 10 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/rpc/binding.c b/librpc/rpc/binding.c
index a660989..4f36fac 100644
--- a/librpc/rpc/binding.c
+++ b/librpc/rpc/binding.c
@@ -370,13 +370,19 @@ _PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struc
 	return NT_STATUS_OK;
 }
 
-_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax)
+_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(const struct epm_floor *epm_floor,
+					    struct ndr_syntax_id *syntax)
 {
 	TALLOC_CTX *mem_ctx = talloc_init("floor_get_lhs_data");
-	struct ndr_pull *ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, NULL);
+	struct ndr_pull *ndr;
 	enum ndr_err_code ndr_err;
 	uint16_t if_version=0;
 
+	ndr = ndr_pull_init_blob(&epm_floor->lhs.lhs_data, mem_ctx, NULL);
+	if (ndr == NULL) {
+		talloc_free(mem_ctx);
+		return NT_STATUS_NO_MEMORY;
+	}
 	ndr->flags |= LIBNDR_FLAG_NOALIGN;
 
 	ndr_err = ndr_pull_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid);
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 826900c..c918515 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2288,7 +2288,8 @@ char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid);
 const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);
 _PUBLIC_ char *dcerpc_binding_string(TALLOC_CTX *mem_ctx, const struct dcerpc_binding *b);
 _PUBLIC_ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_binding **b_out);
-_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(struct epm_floor *epm_floor, struct ndr_syntax_id *syntax);
+_PUBLIC_ NTSTATUS dcerpc_floor_get_lhs_data(const struct epm_floor *epm_floor,
+					    struct ndr_syntax_id *syntax);
 const char *dcerpc_floor_get_rhs_data(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor);
 enum dcerpc_transport_t dcerpc_transport_by_endpoint_protocol(int prot);
 _PUBLIC_ enum dcerpc_transport_t dcerpc_transport_by_tower(struct epm_tower *tower);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list