aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_rand.c
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>2000-02-25 14:16:43 +0000
committerUlf Möller <ulf@openssl.org>2000-02-25 14:16:43 +0000
commitfea217f96f1396ee83341f596ecc083f6a91dfbf (patch)
treeb01e1110cd2001f147edb4b736a48ac99b2c138f /apps/app_rand.c
parentcacbb51ee12c1e7bf05bce83c63832d1f7554535 (diff)
downloadopenssl-fea217f96f1396ee83341f596ecc083f6a91dfbf.tar.gz
EGD bugfix.
Submitted by: Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
Diffstat (limited to 'apps/app_rand.c')
-rw-r--r--apps/app_rand.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_rand.c b/apps/app_rand.c
index ea35bf9b1d..f7f133831d 100644
--- a/apps/app_rand.c
+++ b/apps/app_rand.c
@@ -162,7 +162,8 @@ long app_RAND_load_files(char *name)
char *p,*n;
int last;
long tot=0;
-
+ int egd;
+
for (;;)
{
last=0;
@@ -173,7 +174,8 @@ long app_RAND_load_files(char *name)
name=p+1;
if (*n == '\0') break;
- tot+=RAND_egd(n);
+ egd=RAND_egd(n);
+ if (egd > 0) tot+=egd;
tot+=RAND_load_file(n,1024L*1024L);
if (last) break;
}