Rerun pidl after fixing array copying in client code and authservice array sizes.
authorJelmer Vernooij <jelmer@samba.org>
Fri, 25 Apr 2008 09:22:03 +0000 (10:22 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 25 Apr 2008 10:38:50 +0000 (12:38 +0200)
17 files changed:
source/librpc/gen_ndr/cli_echo.c
source/librpc/gen_ndr/cli_epmapper.c
source/librpc/gen_ndr/cli_eventlog.c
source/librpc/gen_ndr/cli_srvsvc.c
source/librpc/gen_ndr/cli_svcctl.c
source/librpc/gen_ndr/cli_winreg.c
source/librpc/gen_ndr/ndr_dfs.c
source/librpc/gen_ndr/ndr_dssetup.c
source/librpc/gen_ndr/ndr_echo.c
source/librpc/gen_ndr/ndr_epmapper.c
source/librpc/gen_ndr/ndr_lsa.c
source/librpc/gen_ndr/ndr_netlogon.c
source/librpc/gen_ndr/ndr_samr.c
source/librpc/gen_ndr/ndr_srvsvc.c
source/librpc/gen_ndr/ndr_svcctl.c
source/librpc/gen_ndr/ndr_winreg.c
source/librpc/gen_ndr/ndr_wkssvc.c

index addeef65b5b0ed6335e3335992ca2c2c83c9e9f3..23a8907de3b5b6e69a774e4886428d38db938147 100644 (file)
@@ -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;
index 5a91f05b83320a02474336eb84e47c2d9dc67c88..39a695db82ff6c09f465e926845bae6cf908c761 100644 (file)
@@ -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;
index 795995f5ee7425fbf26021c8bd0ce71bf0fef40f..e186719d33812eccadff252664dcb2382b165b88 100644 (file)
@@ -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;
 
index 291e3efa69852c48c4b40af9e64475420c5702ed..f611386e8fe89f21719f7072a76389127a8a1c30 100644 (file)
@@ -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 */
index eadf88f9fcfbe3c5bfb6a00121af565f54669a9e..4065044c31a03ab13d8823a0a72ac0e855f41be8 100644 (file)
@@ -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 */
@@ -759,7 +759,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) {
@@ -913,7 +913,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 */
@@ -1414,7 +1414,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) {
@@ -1566,7 +1566,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 */
@@ -2002,7 +2002,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 */
@@ -2054,7 +2054,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 */
@@ -2106,7 +2106,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 */
@@ -2166,7 +2166,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) {
@@ -2231,7 +2231,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) {
index b7cfffe86c99db0ef5bd013c92fd9ec9e1ee5792..af0e47d90a8d4ed3eee8c55af6a3ae36e65ce15b 100644 (file)
@@ -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;
 
index 2e9873e929a914c3e3ccc43f48b924de40959e11..18975507c7c59359753f93004b61a099e2a4c849 100644 (file)
@@ -5781,7 +5781,7 @@ static const char * const netdfs_authservice_strings[] = {
 };
 
 static const struct ndr_interface_string_array netdfs_authservices = {
-       .count  = 3,
+       .count  = 1,
        .names  = netdfs_authservice_strings
 };
 
index bdad3c44f65af45febd6b163596618c86382ff81..0c02784db826080aefec03753d9088d2bfde11a8 100644 (file)
@@ -1062,7 +1062,7 @@ static const char * const dssetup_authservice_strings[] = {
 };
 
 static const struct ndr_interface_string_array dssetup_authservices = {
-       .count  = 4,
+       .count  = 1,
        .names  = dssetup_authservice_strings
 };
 
index 340167cf739b38b5501d5012fbcd82afaa05e47e..83b5fa1a506697025797cd13db91dfb64e093402 100644 (file)
@@ -1493,7 +1493,7 @@ static const char * const rpcecho_authservice_strings[] = {
 };
 
 static const struct ndr_interface_string_array rpcecho_authservices = {
-       .count  = 3,
+       .count  = 1,
        .names  = rpcecho_authservice_strings
 };
 
index 2e709e11e0d9ec4edd7a5e7d4661c9d1c02c1854..ba2f7bd9c5a7eb8b0e383ca78d8074fbe830e7b9 100644 (file)
@@ -2679,7 +2679,7 @@ static const char * const epmapper_authservice_strings[] = {
 };
 
 static const struct ndr_interface_string_array epmapper_authservices = {
-       .count  = 3,
+       .count  = 1,
        .names  = epmapper_authservice_strings
 };
 
index 750fc081cf938efbd7f62afe99356729c4eb4ec8..c7d428b1b9997b67ada70b1e92ad65735cf67be2 100644 (file)
@@ -12527,7 +12527,7 @@ static const char * const lsarpc_authservice_strings[] = {
 };
 
 static const struct ndr_interface_string_array lsarpc_authservices = {
-       .count  = 5,
+       .count  = 1,
        .names  = lsarpc_authservice_strings
 };
 
index f8803ccd6da1a734d73734fd54c218287d3e6403..ce61f8d0aac7b2d299fa1b4084bb03dac813f7e8 100644 (file)
@@ -15085,7 +15085,7 @@ static const char * const netlogon_authservice_strings[] = {
 };
 
 static const struct ndr_interface_string_array netlogon_authservices = {
-       .count  = 3,
+       .count  = 1,
        .names  = netlogon_authservice_strings
 };
 
index 46b3a0793b24d340a8d6f2981de16fe6ce844e7d..db95ec3a6dce45a30c9c559dfab34785c594fac9 100644 (file)
@@ -12656,7 +12656,7 @@ static const char * const samr_authservice_strings[] = {
 };
 
 static const struct ndr_interface_string_array samr_authservices = {
-       .count  = 3,
+       .count  = 1,
        .names  = samr_authservice_strings
 };
 
index 4e9e81a04083df12dd67c1225f500096f54c0b5d..7e2df4ca70aa71a0eb0e95063788675f3ae318fd 100644 (file)
@@ -19634,7 +19634,7 @@ static const char * const srvsvc_authservice_strings[] = {
 };
 
 static const struct ndr_interface_string_array srvsvc_authservices = {
-       .count  = 3,
+       .count  = 1,
        .names  = srvsvc_authservice_strings
 };
 
index 16e0416288921f2bcb13c2a0c63298030f30cb43..8ceb6b0b473dd10b272eea985c67ab9185e47aa3 100644 (file)
@@ -5998,7 +5998,7 @@ static const char * const svcctl_authservice_strings[] = {
 };
 
 static const struct ndr_interface_string_array svcctl_authservices = {
-       .count  = 2,
+       .count  = 1,
        .names  = svcctl_authservice_strings
 };
 
index 3301dd37620a9fe16e035f6f7f4abfd644aa8379..0a539475135af6690a80c3ef9388bad053dae498 100644 (file)
@@ -4522,7 +4522,7 @@ static const char * const winreg_authservice_strings[] = {
 };
 
 static const struct ndr_interface_string_array winreg_authservices = {
-       .count  = 3,
+       .count  = 1,
        .names  = winreg_authservice_strings
 };
 
index 80ea67526e3fa7dd59ca109979a4ac70ba19c6f7..d3870daf0121363bbf2c26c6275d322938f70832 100644 (file)
@@ -10659,7 +10659,7 @@ static const char * const wkssvc_authservice_strings[] = {
 };
 
 static const struct ndr_interface_string_array wkssvc_authservices = {
-       .count  = 3,
+       .count  = 1,
        .names  = wkssvc_authservice_strings
 };