summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/nttrans.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/smb_server/nttrans.c b/source4/smb_server/nttrans.c
index d405af53d9..27fb4d22db 100644
--- a/source4/smb_server/nttrans.c
+++ b/source4/smb_server/nttrans.c
@@ -413,6 +413,19 @@ void reply_nttrans(struct smbsrv_request *req)
return;
}
+ if (trans.out.setup_count > trans.in.max_setup) {
+ req_reply_error(req, NT_STATUS_BUFFER_TOO_SMALL);
+ return;
+ }
+ if (trans.out.params.length > trans.in.max_param) {
+ status = NT_STATUS_BUFFER_TOO_SMALL;
+ trans.out.params.length = trans.in.max_param;
+ }
+ if (trans.out.data.length > trans.in.max_data) {
+ status = NT_STATUS_BUFFER_TOO_SMALL;
+ trans.out.data.length = trans.in.max_data;
+ }
+
params_left = trans.out.params.length;
data_left = trans.out.data.length;
params = trans.out.params.data;