pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:3222:    *! The third syntax generates a random string and then crypts it,    *! creating a string useful as a password.    *!    *! @note    *! Note that strings containing null characters will only be    *! processed up until the null character.    */   PMOD_EXPORT void f_crypt(INT32 args)   {    char salt[2]; -  char *ret, *pwd, *saltp = NULL; +  char *ret, *pwd = NULL, *saltp = NULL;    char *alphabet =    "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";       get_all_args("crypt", args, ".%s%s", &pwd, &saltp);       if( !pwd )    {    do {    push_random_string(16);    push_constant_text("\0");    f_minus(2);    } while(Pike_sp[-1].u.string->len<8); -  +  pwd = Pike_sp[-1].u.string->str;    }       if(saltp)    {    if( Pike_sp[1-args].u.string->len < 2 )    {    pop_n_elems(args);    push_int(0);    return;    }