summaryrefslogtreecommitdiff
path: root/source3/smbd/pipes.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-11-21 23:17:31 +0100
committerVolker Lendecke <vl@samba.org>2009-01-16 13:00:44 +0100
commitddaa65ef6e049a185281c4d5deca4045e3b085e2 (patch)
treef44b5ea5130fb4de174fa505957d748767be40ce /source3/smbd/pipes.c
parentba981128ac0ba5b6b6f865d72a26509fb52a4a3e (diff)
downloadsamba-ddaa65ef6e049a185281c4d5deca4045e3b085e2.tar.gz
samba-ddaa65ef6e049a185281c4d5deca4045e3b085e2.tar.bz2
samba-ddaa65ef6e049a185281c4d5deca4045e3b085e2.zip
Correctly calculate the offset for read&x
Diffstat (limited to 'source3/smbd/pipes.c')
-rw-r--r--source3/smbd/pipes.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c
index faabdd795b..4841882cc3 100644
--- a/source3/smbd/pipes.c
+++ b/source3/smbd/pipes.c
@@ -278,8 +278,12 @@ void reply_pipe_read_and_X(struct smb_request *req)
srv_set_message((char *)req->outbuf, 12, nread, False);
SSVAL(req->outbuf,smb_vwv5,nread);
- SSVAL(req->outbuf,smb_vwv6,smb_offset(data,req->outbuf));
- SSVAL(smb_buf(req->outbuf),-2,nread);
+ SSVAL(req->outbuf,smb_vwv6,
+ req_wct_ofs(req)
+ + 1 /* the wct field */
+ + 12 * sizeof(uint16_t) /* vwv */
+ + 2); /* the buflen field */
+ SSVAL(req->outbuf,smb_vwv11,smb_maxcnt);
DEBUG(3,("readX-IPC pnum=%04x min=%d max=%d nread=%d\n",
fsp->fnum, smb_mincnt, smb_maxcnt, (int)nread));