summaryrefslogtreecommitdiffstats
path: root/crypto/rand/rand_egd.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 /crypto/rand/rand_egd.c
parentcacbb51ee12c1e7bf05bce83c63832d1f7554535 (diff)
EGD bugfix.
Submitted by: Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
Diffstat (limited to 'crypto/rand/rand_egd.c')
-rw-r--r--crypto/rand/rand_egd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/rand/rand_egd.c b/crypto/rand/rand_egd.c
index 3a081d4f62..b640469faf 100644
--- a/crypto/rand/rand_egd.c
+++ b/crypto/rand/rand_egd.c
@@ -96,6 +96,7 @@ int RAND_egd(const char *path)
buf[1] = 255;
write(fd, buf, 2);
if (read(fd, buf, 1) != 1) goto err;
+ if (buf[0] == 0) goto err;
num = read(fd, buf, 255);
if (num < 1) goto err;
RAND_seed(buf, num);