[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Feb 9 15:53:24 MST 2010


The branch, master has been updated
       via  539bbf8... Second part of fix for bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.
      from  9ad6f43... Fix off-by-one error in working out the limit of the NetServerEnum comment.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 539bbf8653e0117dea139015b4b71be768e3f3d7
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Feb 9 14:48:15 2010 -0800

    Second part of fix for bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.
    
    Ensure we have no naked memcpy calls. This isn't a crash bug (it's
    already checked in the data_blob_talloc_zero() above, but I want to
    get into the pattern of having all memcpy's covered by safety checks.
    
    Jeremy.

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

Summary of changes:
 source3/rpc_server/srv_spoolss_nt.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index e2e523d..33d47df 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -9455,7 +9455,10 @@ WERROR _spoolss_XcvData(pipes_struct *p,
 
 	*r->out.status_code = 0;
 
-	memcpy(r->out.out_data, out_data.data, out_data.length);
+	if (r->out.out_data && r->in.out_data_size && out_data.length) {
+		memcpy(r->out.out_data, out_data.data,
+			MIN(r->in.out_data_size, out_data.length));
+	}
 
 	return WERR_OK;
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list