Constrain the amount of data returned to what is actually available
not the size of the buffer.

Approved by:	grehan (co-mentor)