This change is for fixing the potential integer overflow from "offset + size"