[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-29-22-gc537b43

Jeremy Allison jra at samba.org
Tue Jun 3 01:37:09 GMT 2008


The branch, v3-0-test has been updated
       via  c537b4376db8eb17904d2cf5fa3ec1fa32548742 (commit)
      from  89b771ea2dc90e3017f1aa26f352afce9d0c0b65 (commit)

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


- Log -----------------------------------------------------------------
commit c537b4376db8eb17904d2cf5fa3ec1fa32548742
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Jun 2 18:36:31 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 c467191..b2425e3 100644
--- a/source/libsmb/cliconnect.c
+++ b/source/libsmb/cliconnect.c
@@ -1330,9 +1330,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