summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-03-17 17:20:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:37 -0500
commit8437d5b8913d949b844448d84a003896f9694b94 (patch)
treee5713f7aca3eea61fda850f74813ee4783972f25 /source4
parent2584a532e0a5d6b69c094c0a36de538c4b3c5168 (diff)
downloadsamba-8437d5b8913d949b844448d84a003896f9694b94.tar.gz
samba-8437d5b8913d949b844448d84a003896f9694b94.tar.bz2
samba-8437d5b8913d949b844448d84a003896f9694b94.zip
r14526: fix the size of the output buffer, we need 1 byte for the Word count
now smbsrv_setup_reply() and req_setup_chain_reply() do the same thing tridge: can you please check if this is correct, I wonder why we don't got valgrind errors... as the over allocation is disabled currently metze (This used to be commit 3441a4a74fb324a4dfbca13219df4c55ebcfbf6c)
Diffstat (limited to 'source4')
-rw-r--r--source4/smb_server/smb/request.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/smb_server/smb/request.c b/source4/smb_server/smb/request.c
index 1a3ff23b93..a08a2f6c20 100644
--- a/source4/smb_server/smb/request.c
+++ b/source4/smb_server/smb/request.c
@@ -105,7 +105,7 @@ void smbsrv_setup_reply(struct smbsrv_request *req, uint_t wct, uint_t buflen)
return;
}
- req->out.size = NBT_HDR_SIZE + MIN_SMB_SIZE + wct*2 + buflen;
+ req->out.size = NBT_HDR_SIZE + MIN_SMB_SIZE + 1 + VWV(wct) + 2 + buflen;
/* over allocate by a small amount */
req->out.allocated = req->out.size + REQ_OVER_ALLOCATION;