Check for overflow when parsing array indices