Fixed a nasty bug in the “Read file” function: it wasn't returning the number of bytes read correctly, so some things were getting chopped off, and it was interpreting the return value of read_user() incorrectly, so it was reporting the file as completely read before it should have.
2c16f21573cd320c38dff5ff1972767a3422f442