Deal with reading a buffer less than what was allocated.

With this fix, file_long_read now passes.
Except that if for some reason, it returns say -2, then the following code will almost certainly crash.

So I figured it was better to do anything sensible rather than crash in some mysterious way.