Be more cautious about parsing ISO-9660 timestamps (#2340)
Some ISO images don't have valid timestamps for the root directory
entry. Parsing such timestamps can generate nonsensical results, which
in one case showed up as an unexpected overflow on a 32-bit system.
Add some validation logic that can check whether a 7-byte or 17-byte
timestamp is reasonable-looking, and use this to ignore invalid
timestamps in various locations. This also requires us to be a little
more careful about tracking which timestamps are actually known.
Resolves issue #2329
(cherry picked from commit
e939c97a579131aa021166ef5876b303bccd8472)
Co-authored-by: Tim Kientzle <kientzle@acm.org>