summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr/cli_wkssvc.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-10-17 10:35:51 +0200
committerStefan Metzmacher <metze@samba.org>2007-10-17 10:35:51 +0200
commitba7a979e5374da422b0657161289e344dc23afa1 (patch)
tree3eb895df2ef02fb11dc032512c81b108b6320733 /source3/librpc/gen_ndr/cli_wkssvc.c
parent2b2168bff6ae50954334fa1e391e022e9986841d (diff)
downloadsamba-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/librpc/gen_ndr/cli_wkssvc.c')
-rw-r--r--source3/librpc/gen_ndr/cli_wkssvc.c6
1 files changed, 3 insertions, 3 deletions
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;