From: Tom Yu Date: Thu, 13 Jan 2005 00:37:57 +0000 (+0000) Subject: pullup from trunk X-Git-Tag: krb5-1.4.3-beta1~108 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=84a3d4f524c643f7087ba71f48c28ed8d72dd9f6;p=krb5.git pullup from trunk ticket: 2871 version_fixed: 1.4 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-4@17021 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index ddcca3230..f77c170b2 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,8 @@ +2005-01-12 Tom Yu + + * prng.c (read_entropy_from_device): Use ssize_t, not size_t, so + read() returning -1 doesn't cause trouble. + 2004-11-17 Ken Raeburn * prng.c (do_yarrow_init): Move mutex initialization here. diff --git a/src/lib/crypto/prng.c b/src/lib/crypto/prng.c index 7656a23aa..7371e974e 100644 --- a/src/lib/crypto/prng.c +++ b/src/lib/crypto/prng.c @@ -192,7 +192,7 @@ read_entropy_from_device (krb5_context context, const char *device) return 0; } for (left = sizeof (buf); left > 0;) { - size_t count; + ssize_t count; count = read (fd, &buf, (unsigned) left); if (count <= 0) { close(fd);