File:read goes over EOF

Issue #530 resolved
created an issue

File::read allocates data for the requested size, but then ignores the actual number of bytes that have been read. If PhysFS ever reads less than requested, the returned FileData will have garbage in it.

Attached is a patch that adds a calculation for the length to EOF and clamps the requested size to it.