pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:9286:    {    INT_TYPE tmp;       /* this checks if    * (n - 1) * step + start    * will overflow. if it does, we continue with the slow path. If it does not,    * adding step to start repeatedly will not overflow below. This check has    * false positives, but is much simpler to check than e.g. doing one check    * for every iteration    */ -  if (DO_INT_TYPE_MUL_OVERFLOW(n-1, step, &tmb) || INT_TYPE_ADD_OVERFLOW(tmp, start)) +  if (DO_INT_TYPE_MUL_OVERFLOW(n-1, step, &tmp) || INT_TYPE_ADD_OVERFLOW(tmp, start))    goto slow_path;    }       pop_n_elems(args);    push_array(d=allocate_array(n));    for (i=0; i<n; i++)    {    ITEM(d)[i].u.integer=start;    start+=step;    }