summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-04-16 20:19:25 +0200
committerdefault <nobody@localhost>2023-04-16 20:19:25 +0200
commitf658f345cac7b24d6fa61f08b4ec09823d28b11a (patch)
treebf24a9a43ff15e907e131fc78516b3bf03d3a913 /mastoapi.c
parent8205159f8ca98f525d892c02eb7dadfdf6d446d4 (diff)
Replaced random() with arc4random().
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mastoapi.c b/mastoapi.c
index af8fb27..c562203 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -21,10 +21,10 @@ static xs_str *random_str(void)
fclose(f);
}
else {
- data[0] = random() % 0xffffffff;
- data[1] = random() % 0xffffffff;
- data[2] = random() % 0xffffffff;
- data[3] = random() % 0xffffffff;
+ data[0] = arc4random();
+ data[1] = arc4random();
+ data[2] = arc4random();
+ data[3] = arc4random();
}
return xs_hex_enc((char *)data, sizeof(data));