3.2.5.9 Receiving an SMB_COM_READ Response

The SMB_COM_READ response MUST be processed as specified in section 3.2.5.1.

If the request is successful, the number of bytes returned is specified in the CountOfBytesReturned field. The data read from the file are returned in a Data Buffer (see section 2.2.2.5), which also specifies the number of bytes returned. Both the count of bytes returned and the read bytes themselves MUST be passed to the application. An end-of-file condition is indicated if the number of bytes returned is less than the number of bytes requested.

In the event of a STATUS_BUFFER_OVERFLOW (ERRDOS/ERRmoredata) error, the server MUST return a complete SMB_COM_READ response (not an error response). The CountOfBytesReturned field indicates the number of bytes successfully read.