Issues

Issue #530 resolved

File:read goes over EOF

Boolsheet
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.

Comments (1)

  1. Log in to comment