diff -r -u krb5-1.3.6/src/lib/crypto/prng.c krb5-1.3.6.new/src/lib/crypto/prng.c
--- krb5-1.3.6/src/lib/crypto/prng.c	2003-03-06 21:08:24.000000000 +0100
+++ krb5-1.3.6.new/src/lib/crypto/prng.c	2005-01-11 21:13:53.000000000 +0100
@@ -164,9 +164,9 @@
     return 0;
   }
   for (left = sizeof (buf); left > 0;) {
-    size_t count;
+    ssize_t count;
     count = read (fd, &buf, (unsigned) left);
-    if (count <= 0) {
+    if ((count == -1) || (count <= 0)) {
       close(fd);
       return 0;
     }
