[jcifs] Re: Maximum message size

Urban Widmark urban at teststation.com
Sun Oct 6 04:20:27 EST 2002


On Sat, 5 Oct 2002, Christopher R. Hertel wrote:

> The first thing I note about that structure is that the type of the
> MaxCountHigh has *got* to be wrong.  The description of the field says
> that it contains the "High 16 bits of MaxCount".  We don't need a 32-bit
> field to store 16 bits.

If it was wrong Samba would be reading the wrong high offset, smbfs would 
send the wrong offset, jcifs would ... I suspect that someone would 
notice the massive data corruption that would follow when using >4G 
files and a windows box if the layout was wrong.

> Also the description of WordCount for this block says that the block is 10
> or 12 words long (20 or 24 bytes).  If I count up the bytes following
> WordCount I get 26, or 22 if I leave out the OffsetHigh field (which is the
> optional field).  In other words, there are two extra bytes somewhere.  That
> supports the theory that the MaxCountHigh field should be a USHORT, not a
> ULONG.

Are you counting the ByteCount as a parameter word? Because it isn't.


> Even so, we still have a problem.
> 
>   Why would we need the "High 16 bits of MaxCount if CAP_LARGE_READX"
>   unless we could send more than 65535 bytes?

Future expansion?

/Urban




More information about the jcifs mailing list