From: Guus Sliepen Date: Thu, 27 Jul 2017 08:38:50 +0000 (+0200) Subject: Call srand() at startup. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=38c0600c00e26bbdd5da3f8b844cdb73bbbb0ed4;p=meshlink Call srand() at startup. --- diff --git a/src/meshlink.c b/src/meshlink.c index 6f480e0a..1771202f 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -2337,6 +2337,9 @@ void update_node_status(meshlink_handle_t *mesh, node_t *n) { static void __attribute__((constructor)) meshlink_init(void) { crypto_init(); + unsigned int seed; + randomize(&seed, sizeof seed); + srand(seed); } static void __attribute__((destructor)) meshlink_exit(void) {