From e70b54da696661ed3ce8292f0f6b3a92e5f8bc23 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Thu, 17 Nov 2022 14:26:08 +0100 Subject: [PATCH] made reading /dev/urandom in encrypter little bit more variable --- src/lib/encrypter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/encrypter.c b/src/lib/encrypter.c index 8740cbf..3150cdc 100644 --- a/src/lib/encrypter.c +++ b/src/lib/encrypter.c @@ -40,7 +40,7 @@ outputFlags encryptText(char *text, char *keyNew) //TRY TO MAKE RANDOM GENERATION REALLY "RANDOM" fileBuffer = fopen("/dev/urandom", "r"); - fread(&numberBuffer, 4, 1, fileBuffer); + fread(&numberBuffer, sizeof(numberBuffer), 1, fileBuffer); srand(numberBuffer); numberBuffer = abs(numberBuffer); //MAKE numberBuffer POSITIVE