pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:3159:    {    pop_n_elems(args);    push_int(0);    return;    }    } else {    struct svalue *random =    simple_mapping_string_lookup(get_builtin_constants(), "random");    if(!random || (TYPEOF(*random) != T_FUNCTION))    Pike_error("Unable to resolve random function.\n"); -  push_svalue(random); +     push_int(4096); /* strlen(alphbet)**2 */ -  apply_svalue(&Pike_sp[-2], 1); +  apply_svalue(random, 1);    if(TYPEOF(Pike_sp[-1])!=T_INT)    Pike_error("Couldn't generate random number.\n");       salt[0] = alphabet[ Pike_sp[-1].u.integer & 0x3f ];    salt[1] = alphabet[ (Pike_sp[-1].u.integer>>6) & 0x3f ]; -  pop_n_elems(2); +  pop_stack();       saltp=salt;    if (args > 1) {    pop_n_elems(args-1);    args = 1;    }    }   #ifdef HAVE_CRYPT    ret = (char *)crypt(pwd, saltp);   #else