[SCM] Samba Shared Repository - branch v3-0-test updated - initial-v3-0-unstable-10-gf37f19f

Stefan Metzmacher metze at samba.org
Wed Oct 17 09:01:36 GMT 2007


The branch, v3-0-test has been updated
       via  f37f19f817874e885e70456328e0d3693fc24c9c (commit)
      from  d2a42b4b53362bd3873467ad8849a5e884c818d2 (commit)

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


- Log -----------------------------------------------------------------
commit f37f19f817874e885e70456328e0d3693fc24c9c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 17 10:59:24 2007 +0200

    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.
    
    Note: this is just cosmetic for the 3.0.x tree, as
    rpccli_wkssvc_NetWkstaEnumUsers and rpccli_wkssvc_NetWkstaTransportEnum
    are not used.
    
    metze

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

Summary of changes:
 source/librpc/gen_ndr/cli_wkssvc.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/gen_ndr/cli_wkssvc.c b/source/librpc/gen_ndr/cli_wkssvc.c
index 918851a..99c5816 100644
--- a/source/librpc/gen_ndr/cli_wkssvc.c
+++ b/source/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;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list