From 7756059d38e5702b4ba51f71cefb2a4656244cf7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 24 Jan 2006 20:15:08 +0000 Subject: r13119: Fix for #1779 from William Jojo Jeremy. (This used to be commit 103cac7dd314117b15e27fd263a64beeb36ed6e6) --- source3/libsmb/clireadwrite.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 55e36b646b..a080bd3c64 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -49,8 +49,9 @@ static BOOL cli_issue_read(struct cli_state *cli, int fnum, off_t offset, SSVAL(cli->outbuf,smb_vwv7,((size >> 16) & 1)); SSVAL(cli->outbuf,smb_mid,cli->mid + i); - if (bigoffset) - SIVAL(cli->outbuf,smb_vwv10,(offset>>32) & 0xffffffff); + if (bigoffset) { + SIVAL(cli->outbuf,smb_vwv10,(((SMB_BIG_UINT)offset)>>32) & 0xffffffff); + } return cli_send_smb(cli); } @@ -302,8 +303,9 @@ static BOOL cli_issue_write(struct cli_state *cli, int fnum, off_t offset, SSVAL(cli->outbuf,smb_vwv11, smb_buf(cli->outbuf) - smb_base(cli->outbuf)); - if (large_writex) - SIVAL(cli->outbuf,smb_vwv12,(offset>>32) & 0xffffffff); + if (large_writex) { + SIVAL(cli->outbuf,smb_vwv12,(((SMB_BIG_UINT)offset)>>32) & 0xffffffff); + } p = smb_base(cli->outbuf) + SVAL(cli->outbuf,smb_vwv11); memcpy(p, buf, size); -- cgit