Fix an overflow when reading input files over 2G.