Protect against reading from bad buffer file.