From 698fe0ac106c840671df6668946135e7c8ef4963 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 24 Apr 2010 21:58:11 +0200 Subject: [PATCH] don't read so much from /dev/random as it's slow --- d0_bignum-gmp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/d0_bignum-gmp.c b/d0_bignum-gmp.c index 87aa0b8..a66096d 100644 --- a/d0_bignum-gmp.c +++ b/d0_bignum-gmp.c @@ -41,6 +41,7 @@ void d0_bignum_INITIALIZE() if(f) { unsigned char buf[256]; + setbuf(f, NULL); if(fread(buf, sizeof(buf), 1, f) == 1) { mpz_import(temp.z, sizeof(buf), 1, 1, 0, 0, buf); -- 2.39.2