Fixed the invalid reads when reading across boundary.

The issue was caused by using the temporary pointer as return pointer
rather than the original pointer. This caused all bytes read before the
boundary to be discarded and random bytes from the end of the buffer to
be returned instead.
Lowered the buffer size to 24kB*2 again.