Branch: Tag:

2021-09-12

2021-09-12 12:06:54 by Marcus Comstedt <marcus@mc.pp.se>

crypt: NUL-terminate the salt string

3589:    */   PMOD_EXPORT void f_crypt(INT32 args)   { -  char salt[2]; +  char salt[3];    char *ret, *pwd = NULL, *saltp = NULL;    char *alphabet =    "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
3631:       salt[0] = alphabet[ Pike_sp[-1].u.integer & 0x3f ];    salt[1] = alphabet[ (Pike_sp[-1].u.integer>>6) & 0x3f ]; +  salt[2] = 0;    pop_stack();       saltp=salt;