r23148: Fix old old bug in cli_smbwrite() (not incrementing
authorJeremy Allison <jra@samba.org>
Fri, 25 May 2007 23:50:35 +0000 (23:50 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:22:48 +0000 (12:22 -0500)
data being sent). Patch from mnix@wanm.com.au.
Jeremy.

source/libsmb/clireadwrite.c

index 35d2afe2e77339205990e0bd7446743903ee390f..c31d417fbd30f29ce6fdcc5c0e4fcc76eb66239b 100644 (file)
@@ -443,7 +443,7 @@ ssize_t cli_smbwrite(struct cli_state *cli,
                p = smb_buf(cli->outbuf);
                *p++ = 1;
                SSVAL(p, 0, size); p += 2;
-               memcpy(p, buf, size); p += size;
+               memcpy(p, buf + total, size); p += size;
 
                cli_setup_bcc(cli, p);