summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb2
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-07-08 07:39:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:55 -0500
commitcf901ad491c82794ff28980055466cf117bb0d72 (patch)
tree675f3edbe81a829f64569a8bc7e93657f8815034 /source4/smb_server/smb2
parent1b45214f3186e3be045d09083c27017e67017cdd (diff)
downloadsamba-cf901ad491c82794ff28980055466cf117bb0d72.tar.gz
samba-cf901ad491c82794ff28980055466cf117bb0d72.tar.bz2
samba-cf901ad491c82794ff28980055466cf117bb0d72.zip
r16869: - if we know the blob length, we can preallocated the memory
and avoid a realloc in smb2_push_* - don't overwrite the first data byte metze (This used to be commit 7761a2a595720e30f2a38448761ca77077908be7)
Diffstat (limited to 'source4/smb_server/smb2')
-rw-r--r--source4/smb_server/smb2/fileio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/smb_server/smb2/fileio.c b/source4/smb_server/smb2/fileio.c
index dc9e26d959..ab263d511c 100644
--- a/source4/smb_server/smb2/fileio.c
+++ b/source4/smb_server/smb2/fileio.c
@@ -154,11 +154,10 @@ static void smb2srv_read_send(struct ntvfs_request *ntvfs)
union smb_read *io;
SMB2SRV_CHECK_ASYNC_STATUS(io, union smb_read);
- SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x10, True, 0));
+ SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x10, True, io->smb2.out.data.length));
SMB2SRV_CHECK(smb2_push_o16s32_blob(&req->out, 0x02, io->smb2.out.data));
SBVAL(req->out.body, 0x08, io->smb2.out.unknown1);
- SCVAL(req->out.body, 0x10, 0);
smb2srv_send_reply(req);
}