diff options
-rw-r--r-- | source3/libsmb/clireadwrite.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 668a2693d3..e79fd90614 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -745,7 +745,9 @@ ssize_t cli_write(struct cli_state *cli, break; bwritten += SVAL(cli->inbuf, smb_vwv2); - bwritten += (((int)(SVAL(cli->inbuf, smb_vwv4)))<<16); + if (writesize > 0xFFFF) { + bwritten += (((int)(SVAL(cli->inbuf, smb_vwv4)))<<16); + } } while (received < issued && cli_receive_smb(cli)) { |