summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}