summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/reply.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 24fff5da52..c71c7b8bea 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2718,6 +2718,10 @@ int reply_read_and_X(connection_struct *conn, char *inbuf,char *outbuf,int lengt
if (srv_is_signing_active() || srv_encryption_on()) {
return ERROR_NT(NT_STATUS_NOT_SUPPORTED);
}
+ /* Is there room in the reply for this data ? */
+ if (smb_maxcnt > (0xFFFFFF - (smb_size -4 + 12*2))) {
+ return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
+ }
big_readX = True;
}
}