Thanks for the bug report, test case and fix. I installed the attached, which fixes the bug in a different way to be portable to platforms where off_t is narrower than intmax_t.