Commit 1052e13e authored by Committed by ROOLBrowse files
Fix SMB read to not exceed our negotiated buffer size
The limit for data length in the read operation is set by MaxBufferSize (MAX_RX_BLOCK_SIZE in the source). The problem is, in executing the read, there was no allowance for the SMB overhead, so we're asking for reads that produce packets larger than our buffer, which Samba4 is rightfully rejecting and giving us a short response to fit into the buffer we said we needed it to fit into. Actually, Samba should abort the connection, but it responds to deal with Win2k having a similar bug. Ref: * Definition of MaxBufferSize [MS-CIFS v20180912 s 22.214.171.124.1, pg 282] * Definition of SMB_COM_READ [MS-CIFS v20180912 s126.96.36.199, pg 120] Version 2.66. Tagged as 'OmniLanManFS-2_66'
Showing with 23 additions and 13 deletions