Fix endless loop when the given allocated size was > INT_MAX.