diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-10-17 10:35:51 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-10-17 10:35:51 +0200 |
commit | ba7a979e5374da422b0657161289e344dc23afa1 (patch) | |
tree | 3eb895df2ef02fb11dc032512c81b108b6320733 /source3 | |
parent | 2b2168bff6ae50954334fa1e391e022e9986841d (diff) | |
download | samba-ba7a979e5374da422b0657161289e344dc23afa1.tar.gz samba-ba7a979e5374da422b0657161289e344dc23afa1.tar.bz2 samba-ba7a979e5374da422b0657161289e344dc23afa1.zip |
fix crash bug in pidl generated client code, this
could have happend with [in,out,unique] pointers
when the clients sends a valid pointer, but the server
reponse with a NULL pointer (as samba-3.0.26a do for some calls).
I've tested with midl to see how windows handles this situation
and also the reverse case where the client sends NULL and
the server reposnse with non-NULL.
It appears that midl generated code just ignores this
and only copies the result if both pointers are non-NULL.
metze
(This used to be commit cb98869fa189ce2a926a00fa9077a114f31a5d45)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/librpc/gen_ndr/cli_dfs.c | 12 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_lsa.c | 46 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_netlogon.c | 22 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_srvsvc.c | 34 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_svcctl.c | 24 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_winreg.c | 24 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_wkssvc.c | 6 |
7 files changed, 84 insertions, 84 deletions
diff --git a/source3/librpc/gen_ndr/cli_dfs.c b/source3/librpc/gen_ndr/cli_dfs.c index 9a4e4c8d90..154ceff067 100644 --- a/source3/librpc/gen_ndr/cli_dfs.c +++ b/source3/librpc/gen_ndr/cli_dfs.c @@ -198,10 +198,10 @@ NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint3 } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } - if ( total ) { + if (total && r.out.total) { *total = *r.out.total; } @@ -358,7 +358,7 @@ NTSTATUS rpccli_dfs_AddFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, } /* Return variables */ - if ( unknown2 ) { + if (unknown2 && r.out.unknown2) { *unknown2 = *r.out.unknown2; } @@ -396,7 +396,7 @@ NTSTATUS rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct } /* Return variables */ - if ( unknown ) { + if (unknown && r.out.unknown) { *unknown = *r.out.unknown; } @@ -709,10 +709,10 @@ NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, con } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } - if ( total ) { + if (total && r.out.total) { *total = *r.out.total; } diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index 4c923582f9..50186360f6 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -127,7 +127,7 @@ NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c } /* Return variables */ - if ( sdbuf ) { + if (sdbuf && r.out.sdbuf) { *sdbuf = *r.out.sdbuf; } @@ -252,7 +252,7 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } @@ -482,7 +482,7 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx } /* Return variables */ - if ( domains ) { + if (domains && r.out.domains) { *domains = *r.out.domains; } *sids = *r.out.sids; @@ -521,7 +521,7 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, } /* Return variables */ - if ( domains ) { + if (domains && r.out.domains) { *domains = *r.out.domains; } *names = *r.out.names; @@ -622,7 +622,7 @@ NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *me } /* Return variables */ - if ( privs ) { + if (privs && r.out.privs) { *privs = *r.out.privs; } @@ -868,7 +868,7 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_C } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } @@ -999,16 +999,16 @@ NTSTATUS rpccli_lsa_QuerySecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx } /* Return variables */ - if ( new_val ) { + if (new_val && r.out.new_val) { *new_val = *r.out.new_val; } - if ( new_mtime ) { + if (new_mtime && r.out.new_mtime) { *new_mtime = *r.out.new_mtime; } - if ( old_val ) { + if (old_val && r.out.old_val) { *old_val = *r.out.old_val; } - if ( old_mtime ) { + if (old_mtime && r.out.old_mtime) { *old_mtime = *r.out.old_mtime; } @@ -1074,7 +1074,7 @@ NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return variables */ - if ( name ) { + if (name && r.out.name) { *name = *r.out.name; } @@ -1110,7 +1110,7 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, TALLOC_CT } /* Return variables */ - if ( disp_name ) { + if (disp_name && r.out.disp_name) { *disp_name = *r.out.disp_name; } *language_id = *r.out.language_id; @@ -1304,7 +1304,7 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, TAL } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } @@ -1490,10 +1490,10 @@ NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx } /* Return variables */ - if ( account_name ) { + if (account_name && r.out.account_name) { *account_name = *r.out.account_name; } - if ( authority_name ) { + if (authority_name && r.out.authority_name) { *authority_name = *r.out.authority_name; } @@ -1527,7 +1527,7 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *me } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } @@ -1591,7 +1591,7 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli, TA } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } @@ -1752,7 +1752,7 @@ NTSTATUS rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client *cli, TA } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } @@ -1885,7 +1885,7 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx } /* Return variables */ - if ( domains ) { + if (domains && r.out.domains) { *domains = *r.out.domains; } *names = *r.out.names; @@ -1927,7 +1927,7 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct } /* Return variables */ - if ( domains ) { + if (domains && r.out.domains) { *domains = *r.out.domains; } *sids = *r.out.sids; @@ -2230,7 +2230,7 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct } /* Return variables */ - if ( domains ) { + if (domains && r.out.domains) { *domains = *r.out.domains; } *sids = *r.out.sids; @@ -2473,7 +2473,7 @@ NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx } /* Return variables */ - if ( domains ) { + if (domains && r.out.domains) { *domains = *r.out.domains; } *names = *r.out.names; @@ -2514,7 +2514,7 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct } /* Return variables */ - if ( domains ) { + if (domains && r.out.domains) { *domains = *r.out.domains; } *sids = *r.out.sids; diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index d986cef58b..20c5f2d2e5 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -33,7 +33,7 @@ NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } @@ -105,7 +105,7 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return variables */ - if ( return_authenticator ) { + if (return_authenticator && r.out.return_authenticator) { *return_authenticator = *r.out.return_authenticator; } *validation = *r.out.validation; @@ -145,7 +145,7 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem } /* Return variables */ - if ( return_authenticator ) { + if (return_authenticator && r.out.return_authenticator) { *return_authenticator = *r.out.return_authenticator; } @@ -290,7 +290,7 @@ NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem /* Return variables */ *return_authenticator = *r.out.return_authenticator; *sequence_num = *r.out.sequence_num; - if ( delta_enum_array ) { + if (delta_enum_array && r.out.delta_enum_array) { *delta_enum_array = *r.out.delta_enum_array; } @@ -331,7 +331,7 @@ NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c /* Return variables */ *return_authenticator = *r.out.return_authenticator; *sync_context = *r.out.sync_context; - if ( delta_enum_array ) { + if (delta_enum_array && r.out.delta_enum_array) { *delta_enum_array = *r.out.delta_enum_array; } @@ -626,7 +626,7 @@ NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ /* Return variables */ *return_authenticator = *r.out.return_authenticator; *sync_context = *r.out.sync_context; - if ( delta_enum_array ) { + if (delta_enum_array && r.out.delta_enum_array) { *delta_enum_array = *r.out.delta_enum_array; } @@ -665,7 +665,7 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c /* Return variables */ *return_authenticator = *r.out.return_authenticator; - if ( delta_enum_array ) { + if (delta_enum_array && r.out.delta_enum_array) { *delta_enum_array = *r.out.delta_enum_array; } @@ -765,7 +765,7 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } @@ -985,7 +985,7 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } @@ -1215,7 +1215,7 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *me } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } @@ -1558,7 +1558,7 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_ } /* Return variables */ - if ( return_authenticator ) { + if (return_authenticator && r.out.return_authenticator) { *return_authenticator = *r.out.return_authenticator; } *validation = *r.out.validation; diff --git a/source3/librpc/gen_ndr/cli_srvsvc.c b/source3/librpc/gen_ndr/cli_srvsvc.c index 7944340e47..e848e5b9c1 100644 --- a/source3/librpc/gen_ndr/cli_srvsvc.c +++ b/source3/librpc/gen_ndr/cli_srvsvc.c @@ -38,7 +38,7 @@ NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *m *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } @@ -144,7 +144,7 @@ NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX * *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } @@ -215,7 +215,7 @@ NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CT } /* Return variables */ - if ( parm_error ) { + if (parm_error && r.out.parm_error) { *parm_error = *r.out.parm_error; } @@ -319,7 +319,7 @@ NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } @@ -361,7 +361,7 @@ NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } @@ -467,7 +467,7 @@ NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } @@ -535,7 +535,7 @@ NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return variables */ - if ( parm_error ) { + if (parm_error && r.out.parm_error) { *parm_error = *r.out.parm_error; } @@ -575,7 +575,7 @@ NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX * *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } @@ -645,7 +645,7 @@ NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX * } /* Return variables */ - if ( parm_error ) { + if (parm_error && r.out.parm_error) { *parm_error = *r.out.parm_error; } @@ -809,7 +809,7 @@ NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *me } /* Return variables */ - if ( parm_error ) { + if (parm_error && r.out.parm_error) { *parm_error = *r.out.parm_error; } @@ -848,7 +848,7 @@ NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ /* Return variables */ *info = *r.out.info; *totalentries = *r.out.totalentries; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } @@ -954,7 +954,7 @@ NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *level = *r.out.level; *transports = *r.out.transports; *totalentries = *r.out.totalentries; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } @@ -1019,7 +1019,7 @@ NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem } /* Return variables */ - if ( info ) { + if (info && r.out.info) { *info = *r.out.info; } @@ -1292,7 +1292,7 @@ NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } @@ -1327,7 +1327,7 @@ NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX } /* Return variables */ - if ( hnd ) { + if (hnd && r.out.hnd) { *hnd = *r.out.hnd; } @@ -1360,7 +1360,7 @@ NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX } /* Return variables */ - if ( hnd ) { + if (hnd && r.out.hnd) { *hnd = *r.out.hnd; } @@ -1396,7 +1396,7 @@ NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CT } /* Return variables */ - if ( sd_buf ) { + if (sd_buf && r.out.sd_buf) { *sd_buf = *r.out.sd_buf; } diff --git a/source3/librpc/gen_ndr/cli_svcctl.c b/source3/librpc/gen_ndr/cli_svcctl.c index 91a1d3493b..005ec85ad6 100644 --- a/source3/librpc/gen_ndr/cli_svcctl.c +++ b/source3/librpc/gen_ndr/cli_svcctl.c @@ -420,7 +420,7 @@ NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *m } /* Return variables */ - if ( TagId ) { + if (TagId && r.out.TagId) { *TagId = *r.out.TagId; } *handle = *r.out.handle; @@ -456,7 +456,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLO } /* Return variables */ - if ( service_status ) { + if (service_status && r.out.service_status) { *service_status = *r.out.service_status; } *bytes_needed = *r.out.bytes_needed; @@ -498,7 +498,7 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_C memcpy(service, r.out.service, r.in.buf_size); *bytes_needed = *r.out.bytes_needed; *services_returned = *r.out.services_returned; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } @@ -698,7 +698,7 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLO /* Return variables */ *display_name = *r.out.display_name; - if ( display_name_length ) { + if (display_name_length && r.out.display_name_length) { *display_name_length = *r.out.display_name_length; } @@ -734,7 +734,7 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CT /* Return variables */ *key_name = *r.out.key_name; - if ( display_name_length ) { + if (display_name_length && r.out.display_name_length) { *display_name_length = *r.out.display_name_length; } @@ -851,7 +851,7 @@ NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *m } /* Return variables */ - if ( TagId ) { + if (TagId && r.out.TagId) { *TagId = *r.out.TagId; } @@ -886,7 +886,7 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLO } /* Return variables */ - if ( service_status ) { + if (service_status && r.out.service_status) { *service_status = *r.out.service_status; } *bytes_needed = *r.out.bytes_needed; @@ -928,7 +928,7 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_C memcpy(service, r.out.service, r.in.buf_size); *bytes_needed = *r.out.bytes_needed; *services_returned = *r.out.services_returned; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } @@ -1127,7 +1127,7 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLO /* Return variables */ *display_name = *r.out.display_name; - if ( display_name_length ) { + if (display_name_length && r.out.display_name_length) { *display_name_length = *r.out.display_name_length; } @@ -1163,7 +1163,7 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CT /* Return variables */ *key_name = *r.out.key_name; - if ( display_name_length ) { + if (display_name_length && r.out.display_name_length) { *display_name_length = *r.out.display_name_length; } @@ -1428,7 +1428,7 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *m memcpy(services, r.out.services, r.in.buf_size); *bytes_needed = *r.out.bytes_needed; *service_returned = *r.out.service_returned; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } *group_name = *r.out.group_name; @@ -1470,7 +1470,7 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *m memcpy(services, r.out.services, r.in.buf_size); *bytes_needed = *r.out.bytes_needed; *service_returned = *r.out.service_returned; - if ( resume_handle ) { + if (resume_handle && r.out.resume_handle) { *resume_handle = *r.out.resume_handle; } *group_name = *r.out.group_name; diff --git a/source3/librpc/gen_ndr/cli_winreg.c b/source3/librpc/gen_ndr/cli_winreg.c index 8d45b4617c..0450f056d0 100644 --- a/source3/librpc/gen_ndr/cli_winreg.c +++ b/source3/librpc/gen_ndr/cli_winreg.c @@ -229,7 +229,7 @@ NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct /* Return variables */ *new_handle = *r.out.new_handle; - if ( action_taken ) { + if (action_taken && r.out.action_taken) { *action_taken = *r.out.action_taken; } @@ -329,10 +329,10 @@ NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, /* Return variables */ *name = *r.out.name; - if ( keyclass ) { + if (keyclass && r.out.keyclass) { *keyclass = *r.out.keyclass; } - if ( last_changed_time ) { + if (last_changed_time && r.out.last_changed_time) { *last_changed_time = *r.out.last_changed_time; } @@ -372,16 +372,16 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct /* Return variables */ *name = *r.out.name; - if ( type ) { + if (type && r.out.type) { *type = *r.out.type; } - if ( value ) { + if (value && r.out.value) { memcpy(value, r.out.value, *r.in.size); } - if ( size ) { + if (size && r.out.size) { *size = *r.out.size; } - if ( length ) { + if (length && r.out.length) { *length = *r.out.length; } @@ -624,16 +624,16 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c } /* Return variables */ - if ( type ) { + if (type && r.out.type) { *type = *r.out.type; } - if ( data ) { + if (data && r.out.data) { memcpy(data, r.out.data, *r.in.data_size); } - if ( data_size ) { + if (data_size && r.out.data_size) { *data_size = *r.out.data_size; } - if ( value_length ) { + if (value_length && r.out.value_length) { *value_length = *r.out.value_length; } @@ -1018,7 +1018,7 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, TALLOC_C /* Return variables */ memcpy(values, r.out.values, r.in.num_values); - if ( buffer ) { + if (buffer && r.out.buffer) { memcpy(buffer, r.out.buffer, *r.in.buffer_size); } *buffer_size = *r.out.buffer_size; diff --git a/source3/librpc/gen_ndr/cli_wkssvc.c b/source3/librpc/gen_ndr/cli_wkssvc.c index ed65acce28..16b11277a2 100644 --- a/source3/librpc/gen_ndr/cli_wkssvc.c +++ b/source3/librpc/gen_ndr/cli_wkssvc.c @@ -102,10 +102,10 @@ NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ *users = *r.out.users; - if ( entriesread ) { + if (entriesread && r.out.entriesread) { *entriesread = *r.out.entriesread; } - if ( totalentries ) { + if (totalentries && r.out.totalentries) { *totalentries = *r.out.totalentries; } *resumehandle = *r.out.resumehandle; @@ -203,7 +203,7 @@ NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC /* Return variables */ *level = *r.out.level; *ctr = *r.out.ctr; - if ( totalentries ) { + if (totalentries && r.out.totalentries) { *totalentries = *r.out.totalentries; } *resume_handle = *r.out.resume_handle; |