pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
2021-09-12
2021-09-12 12:06:54 by Marcus Comstedt <marcus@mc.pp.se>
bc8e99109f4d3cddc44cf3d8ea97155a941cb0ef (
4
lines) (+
3
/-
1
)
[
Show
|
Annotate
]
Branch:
master
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;