Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(fits): Make sure to close if open fails to find right magic number (
AcademySoftwareFoundation#3771) There are two ways to fail the FITS magic number check: fail to read the bytes, or the bytes don't match the magic number. It seemed suspicious that we call close() for the latter but not the former. Combine them into a single error response (they had the same message, anyway). Also, make sure FitsInput::init() fully clears some other data structures. Oversight? I don't know if any of these things are real bugs, but they look sloppy and potentially problematic, so fixing them up.
- Loading branch information