diff options
| author | 2023-04-16 20:19:25 +0200 | |
|---|---|---|
| committer | 2023-04-16 20:19:25 +0200 | |
| commit | f658f345cac7b24d6fa61f08b4ec09823d28b11a (patch) | |
| tree | bf24a9a43ff15e907e131fc78516b3bf03d3a913 /snac.c | |
| parent | Replaced strcpy() with strncpy(). (diff) | |
| download | snac2-f658f345cac7b24d6fa61f08b4ec09823d28b11a.tar.gz snac2-f658f345cac7b24d6fa61f08b4ec09823d28b11a.tar.xz snac2-f658f345cac7b24d6fa61f08b4ec09823d28b11a.zip | |
Replaced random() with arc4random().
Diffstat (limited to 'snac.c')
| -rw-r--r-- | snac.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -123,7 +123,7 @@ d_char *hash_password(const char *uid, const char *passwd, const char *nonce) | |||
| 123 | xs *hash; | 123 | xs *hash; |
| 124 | 124 | ||
| 125 | if (nonce == NULL) { | 125 | if (nonce == NULL) { |
| 126 | d_nonce = xs_fmt("%08x", random()); | 126 | d_nonce = xs_fmt("%08x", arc4random()); |
| 127 | nonce = d_nonce; | 127 | nonce = d_nonce; |
| 128 | } | 128 | } |
| 129 | 129 | ||