Fix for bug 368751
We eventually accessed a byte after the memory-mapped input file. If input file size is a multiple of 4096, this could (and did) result in a crash/segfault.