RPCPipeStream: Treat the bytes written to the pipe as a single message unit

This commit is contained in:
Tal Aloni 2017-09-09 09:38:17 +03:00
parent 86d0089a30
commit e22423c8c1

View file

@ -42,14 +42,9 @@ namespace SMBLibrary.Services
public override void Write(byte[] buffer, int offset, int count)
{
int lengthOfPDUs = 0;
do
{
// [MC-CIFS] In message mode, the system treats the bytes read or written in each I/O operation to the pipe as a message unit.
RPCPDU rpcRequest = RPCPDU.GetPDU(buffer, offset);
ProcessRPCRequest(rpcRequest);
lengthOfPDUs += rpcRequest.FragmentLength;
}
while (lengthOfPDUs < count);
}
private void ProcessRPCRequest(RPCPDU rpcRequest)