>>18
In your implementation of read-file
, shouldn't there be at least two calls to read-bytevector
, with the last call checking that it is an end-of-file object? If the file size changes between file-length
and call-with-binary-input-file
, we might get the wrong data. I think this is an example of a "time-of-check to time-of-use" bug.