Fix the potential integer overflow from "offset + size".