[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-914-gac4c63d

Jelmer Vernooij jelmer at samba.org
Tue Apr 15 14:11:40 GMT 2008


The branch, v3-2-test has been updated
       via  ac4c63d999f9ae61428bcdae400d127459896d6c (commit)
      from  ccdebe97f85b76378e42d8cf08324228bd19cf32 (commit)

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


- Log -----------------------------------------------------------------
commit ac4c63d999f9ae61428bcdae400d127459896d6c
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Apr 15 16:11:10 2008 +0200

    Regenerate DCE/RPC client code after fixing memcpy() length bug in pidl.

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

Summary of changes:
 source/librpc/gen_ndr/cli_echo.c     |    4 ++--
 source/librpc/gen_ndr/cli_epmapper.c |    4 ++--
 source/librpc/gen_ndr/cli_eventlog.c |    2 +-
 source/librpc/gen_ndr/cli_ntsvcs.c   |    2 +-
 source/librpc/gen_ndr/cli_srvsvc.c   |    2 +-
 source/librpc/gen_ndr/cli_svcctl.c   |   22 +++++++++++-----------
 source/librpc/gen_ndr/cli_winreg.c   |    8 ++++----
 7 files changed, 22 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/gen_ndr/cli_echo.c b/source/librpc/gen_ndr/cli_echo.c
index addeef6..23a8907 100644
--- a/source/librpc/gen_ndr/cli_echo.c
+++ b/source/librpc/gen_ndr/cli_echo.c
@@ -84,7 +84,7 @@ NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(out_data, r.out.out_data, r.in.len);
+	memcpy(out_data, r.out.out_data, r.in.len * sizeof(*out_data));
 
 	/* Return result */
 	return NT_STATUS_OK;
@@ -166,7 +166,7 @@ NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(data, r.out.data, r.in.len);
+	memcpy(data, r.out.data, r.in.len * sizeof(*data));
 
 	/* Return result */
 	return NT_STATUS_OK;
diff --git a/source/librpc/gen_ndr/cli_epmapper.c b/source/librpc/gen_ndr/cli_epmapper.c
index 5a91f05..39a695d 100644
--- a/source/librpc/gen_ndr/cli_epmapper.c
+++ b/source/librpc/gen_ndr/cli_epmapper.c
@@ -138,7 +138,7 @@ NTSTATUS rpccli_epm_Lookup(struct rpc_pipe_client *cli,
 	/* Return variables */
 	*entry_handle = *r.out.entry_handle;
 	*num_ents = *r.out.num_ents;
-	memcpy(entries, r.out.entries, r.in.max_ents);
+	memcpy(entries, r.out.entries, r.in.max_ents * sizeof(*entries));
 
 	/* Return result */
 	return NT_STATUS_OK;
@@ -188,7 +188,7 @@ NTSTATUS rpccli_epm_Map(struct rpc_pipe_client *cli,
 	/* Return variables */
 	*entry_handle = *r.out.entry_handle;
 	*num_towers = *r.out.num_towers;
-	memcpy(towers, r.out.towers, r.in.max_towers);
+	memcpy(towers, r.out.towers, r.in.max_towers * sizeof(*towers));
 
 	/* Return result */
 	return NT_STATUS_OK;
diff --git a/source/librpc/gen_ndr/cli_eventlog.c b/source/librpc/gen_ndr/cli_eventlog.c
index 795995f..e186719 100644
--- a/source/librpc/gen_ndr/cli_eventlog.c
+++ b/source/librpc/gen_ndr/cli_eventlog.c
@@ -446,7 +446,7 @@ NTSTATUS rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(data, r.out.data, r.in.number_of_bytes);
+	memcpy(data, r.out.data, r.in.number_of_bytes * sizeof(*data));
 	*sent_size = *r.out.sent_size;
 	*real_size = *r.out.real_size;
 
diff --git a/source/librpc/gen_ndr/cli_ntsvcs.c b/source/librpc/gen_ndr/cli_ntsvcs.c
index 864caef..edc0c55 100644
--- a/source/librpc/gen_ndr/cli_ntsvcs.c
+++ b/source/librpc/gen_ndr/cli_ntsvcs.c
@@ -611,7 +611,7 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
 
 	/* Return variables */
 	*unknown1 = *r.out.unknown1;
-	memcpy(buffer, r.out.buffer, *r.in.buffer_size);
+	memcpy(buffer, r.out.buffer, *r.in.buffer_size * sizeof(*buffer));
 	*buffer_size = *r.out.buffer_size;
 	*needed = *r.out.needed;
 
diff --git a/source/librpc/gen_ndr/cli_srvsvc.c b/source/librpc/gen_ndr/cli_srvsvc.c
index 291e3ef..f611386 100644
--- a/source/librpc/gen_ndr/cli_srvsvc.c
+++ b/source/librpc/gen_ndr/cli_srvsvc.c
@@ -1663,7 +1663,7 @@ NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(can_path, r.out.can_path, r.in.maxbuf);
+	memcpy(can_path, r.out.can_path, r.in.maxbuf * sizeof(*can_path));
 	*pathtype = *r.out.pathtype;
 
 	/* Return result */
diff --git a/source/librpc/gen_ndr/cli_svcctl.c b/source/librpc/gen_ndr/cli_svcctl.c
index 93cef23..406a4a8 100644
--- a/source/librpc/gen_ndr/cli_svcctl.c
+++ b/source/librpc/gen_ndr/cli_svcctl.c
@@ -230,7 +230,7 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(buffer, r.out.buffer, r.in.buffer_size);
+	memcpy(buffer, r.out.buffer, r.in.buffer_size * sizeof(*buffer));
 	*needed = *r.out.needed;
 
 	/* Return result */
@@ -699,7 +699,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(service_status, r.out.service_status, r.in.buf_size);
+	memcpy(service_status, r.out.service_status, r.in.buf_size * sizeof(*service_status));
 	*bytes_needed = *r.out.bytes_needed;
 	*services_returned = *r.out.services_returned;
 
@@ -757,7 +757,7 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(service, r.out.service, r.in.buf_size);
+	memcpy(service, r.out.service, r.in.buf_size * sizeof(*service));
 	*bytes_needed = *r.out.bytes_needed;
 	*services_returned = *r.out.services_returned;
 	if (resume_handle && r.out.resume_handle) {
@@ -911,7 +911,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(query, r.out.query, r.in.buf_size);
+	memcpy(query, r.out.query, r.in.buf_size * sizeof(*query));
 	*bytes_needed = *r.out.bytes_needed;
 
 	/* Return result */
@@ -1412,7 +1412,7 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(service, r.out.service, r.in.buf_size);
+	memcpy(service, r.out.service, r.in.buf_size * sizeof(*service));
 	*bytes_needed = *r.out.bytes_needed;
 	*services_returned = *r.out.services_returned;
 	if (resume_handle && r.out.resume_handle) {
@@ -1564,7 +1564,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(query, r.out.query, r.in.buf_size);
+	memcpy(query, r.out.query, r.in.buf_size * sizeof(*query));
 	*bytes_needed = *r.out.bytes_needed;
 
 	/* Return result */
@@ -2000,7 +2000,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(buffer, r.out.buffer, r.in.buf_size);
+	memcpy(buffer, r.out.buffer, r.in.buf_size * sizeof(*buffer));
 	*bytes_needed = *r.out.bytes_needed;
 
 	/* Return result */
@@ -2052,7 +2052,7 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(buffer, r.out.buffer, r.in.buf_size);
+	memcpy(buffer, r.out.buffer, r.in.buf_size * sizeof(*buffer));
 	*bytes_needed = *r.out.bytes_needed;
 
 	/* Return result */
@@ -2104,7 +2104,7 @@ NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(buffer, r.out.buffer, r.in.buf_size);
+	memcpy(buffer, r.out.buffer, r.in.buf_size * sizeof(*buffer));
 	*bytes_needed = *r.out.bytes_needed;
 
 	/* Return result */
@@ -2164,7 +2164,7 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(services, r.out.services, r.in.buf_size);
+	memcpy(services, r.out.services, r.in.buf_size * sizeof(*services));
 	*bytes_needed = *r.out.bytes_needed;
 	*service_returned = *r.out.service_returned;
 	if (resume_handle && r.out.resume_handle) {
@@ -2229,7 +2229,7 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(services, r.out.services, r.in.buf_size);
+	memcpy(services, r.out.services, r.in.buf_size * sizeof(*services));
 	*bytes_needed = *r.out.bytes_needed;
 	*service_returned = *r.out.service_returned;
 	if (resume_handle && r.out.resume_handle) {
diff --git a/source/librpc/gen_ndr/cli_winreg.c b/source/librpc/gen_ndr/cli_winreg.c
index b7cfffe..af0e47d 100644
--- a/source/librpc/gen_ndr/cli_winreg.c
+++ b/source/librpc/gen_ndr/cli_winreg.c
@@ -555,7 +555,7 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli,
 		*type = *r.out.type;
 	}
 	if (value && r.out.value) {
-		memcpy(value, r.out.value, *r.in.size);
+		memcpy(value, r.out.value, *r.in.size * sizeof(*value));
 	}
 	if (size && r.out.size) {
 		*size = *r.out.size;
@@ -933,7 +933,7 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli,
 		*type = *r.out.type;
 	}
 	if (data && r.out.data) {
-		memcpy(data, r.out.data, *r.in.data_size);
+		memcpy(data, r.out.data, *r.in.data_size * sizeof(*data));
 	}
 	if (data_size && r.out.data_size) {
 		*data_size = *r.out.data_size;
@@ -1511,9 +1511,9 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	memcpy(values, r.out.values, r.in.num_values);
+	memcpy(values, r.out.values, r.in.num_values * sizeof(*values));
 	if (buffer && r.out.buffer) {
-		memcpy(buffer, r.out.buffer, *r.in.buffer_size);
+		memcpy(buffer, r.out.buffer, *r.in.buffer_size * sizeof(*buffer));
 	}
 	*buffer_size = *r.out.buffer_size;
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list