[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-2710-g19519bc

Jeremy Allison jra at samba.org
Tue Jun 3 01:40:22 GMT 2008


The branch, v3-3-test has been updated
       via  19519bca9b64b736d2fe0447b7cd495f00dba60a (commit)
      from  45cd78030f18a792d0761160bb96116d19801109 (commit)

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


- Log -----------------------------------------------------------------
commit 19519bca9b64b736d2fe0447b7cd495f00dba60a
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Jun 2 18:37:16 2008 -0700

    Fix bug reported by David Eisner <deisner at gmail.com>. When allocating cli
    buffers for large read/write - make sure we take account of the large
    read/write SMB headers as well as the buffer space.
    Jeremy.

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

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


Changeset truncated at 500 lines:

diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c
index 134c3c8..4285753 100644
--- a/source/libsmb/cliconnect.c
+++ b/source/libsmb/cliconnect.c
@@ -1353,9 +1353,9 @@ bool cli_negprot(struct cli_state *cli)
 		if (cli->capabilities & (CAP_LARGE_READX|CAP_LARGE_WRITEX)) {
 			SAFE_FREE(cli->outbuf);
 			SAFE_FREE(cli->inbuf);
-			cli->outbuf = (char *)SMB_MALLOC(CLI_SAMBA_MAX_LARGE_READX_SIZE+SAFETY_MARGIN);
-			cli->inbuf = (char *)SMB_MALLOC(CLI_SAMBA_MAX_LARGE_READX_SIZE+SAFETY_MARGIN);
-			cli->bufsize = CLI_SAMBA_MAX_LARGE_READX_SIZE;
+			cli->outbuf = (char *)SMB_MALLOC(CLI_SAMBA_MAX_LARGE_READX_SIZE+LARGE_WRITEX_HDR_SIZE+SAFETY_MARGIN);
+			cli->inbuf = (char *)SMB_MALLOC(CLI_SAMBA_MAX_LARGE_READX_SIZE+LARGE_WRITEX_HDR_SIZE+SAFETY_MARGIN);
+			cli->bufsize = CLI_SAMBA_MAX_LARGE_READX_SIZE + LARGE_WRITEX_HDR_SIZE;
 		}
 
 	} else if (cli->protocol >= PROTOCOL_LANMAN1) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list