Reapply "Use crypt_r in threaded code"
This commit is contained in:
@@ -948,7 +948,10 @@ ws_ctx_t *do_handshake(int sock) {
|
|||||||
free(set->entries);
|
free(set->entries);
|
||||||
free(set);
|
free(set);
|
||||||
|
|
||||||
const char *encrypted = crypt(resppw, "$5$kasm$");
|
struct crypt_data cdata;
|
||||||
|
cdata.initialized = 0;
|
||||||
|
|
||||||
|
const char *encrypted = crypt_r(resppw, "$5$kasm$", &cdata);
|
||||||
*resppw = '\0';
|
*resppw = '\0';
|
||||||
|
|
||||||
snprintf(pwbuf, 4096, "%s%s", response, encrypted);
|
snprintf(pwbuf, 4096, "%s%s", response, encrypted);
|
||||||
|
|||||||
Reference in New Issue
Block a user