check_overflow: relax rules on if (ptr < &array[max]) a bit