Created by: AMS21
This was caused by a misuse of the read
function which was called only once and expected to read the entire file_size
this is however not correct.
To quote the man page
RETURN VALUE
On success, the number of bytes read is returned (zero indicates end of file), and the file position is advanced by this number. It is not an error if this number is smaller than the number of bytes requested; this may happen for example because fewer bytes are actually available right now (maybe because we were close to end-of-file, or because we are reading from a pipe, or from a terminal), or because read() was interrupted by a signal.
Note all other platforms we support do guarantee to read the entire buffer.