summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-08-10 17:37:08 +0200
committerVolker Lendecke <vl@samba.org>2008-08-10 18:24:32 +0200
commit12b6c1f57db772679cfb4b640a3f3dba259c9c72 (patch)
tree17d2bcb7abc31328717bd3fd9aaa2b3204cdb512 /source3/smbd
parent4dfb6c0347f88d5be278d41c24752e9a98b0d1c8 (diff)
downloadsamba-12b6c1f57db772679cfb4b640a3f3dba259c9c72.tar.gz
samba-12b6c1f57db772679cfb4b640a3f3dba259c9c72.tar.bz2
samba-12b6c1f57db772679cfb4b640a3f3dba259c9c72.zip
Fix andx offset calculation for more than 2 chained requests
Untested code is broken code.... Test follows later, it's quite an intrusive change to libsmb/ (This used to be commit 0ff16e8573f3c312f10fc723648319fa1f514ac0)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index da1165219b..a1d2d88b3d 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1696,7 +1696,7 @@ void chain_reply(struct smb_request *req)
* remember how much the caller added to the chain, only counting
* stuff after the parameter words
*/
- chain_size += outsize_padded - smb_wct;
+ chain_size += (outsize_padded - smb_wct);
/*
* work out pointers into the original packets. The
@@ -1825,6 +1825,12 @@ void chain_reply(struct smb_request *req)
SAFE_FREE(caller_output);
TALLOC_FREE(req2);
+ /*
+ * Reset the chain_size for our caller's offset calculations
+ */
+
+ chain_size -= (outsize_padded - smb_wct);
+
return;
}