Yes, the read is corrupted it looks to have just thrown garbage in the buffer. Try changing the read to end at 524287, your file ended at 8000F instead of 7FFFFh(524287d)