Changing function arg type from off_t to size_t fixes segfault on 32-bit GNU/Linux