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

Jeremy Allison jra at samba.org
Tue Jun 3 01:38:47 GMT 2008


The branch, v3-2-test has been updated
       via  220bb029a9f32a011c59013076eaeb3a86dc8843 (commit)
      from  d634d78cdfbfa9e27cf9cb5ada3c5220be257a7f (commit)

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


- Log -----------------------------------------------------------------
commit 220bb029a9f32a011c59013076eaeb3a86dc8843
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 3b97beb..632d910 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