OSSP CVS Repository

ossp - Check-in [5121]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 5121
Date: 2005-Aug-30 21:25:04 (local)
2005-Aug-30 19:25:04 (UTC)
User:rse
Branch:
Comment: annotate what the source really is
Tickets:
Inspections:
Files:
ossp-pkg/uuid/uuid_prng.c      1.7 -> 1.8     3 inserted, 3 deleted

ossp-pkg/uuid/uuid_prng.c 1.7 -> 1.8

--- uuid_prng.c  2005/08/30 18:41:56     1.7
+++ uuid_prng.c  2005/08/30 19:25:04     1.8
@@ -130,9 +130,9 @@
     /* approach 2: try to gather data via weaker libc PRNG API. */
     while (n > 0) {
         /* gather new entropy */
-        (void)gettimeofday(&(entropy.tv), NULL);
-        entropy.cnt = prng->cnt++;
-        entropy.rnd = rand();
+        (void)gettimeofday(&(entropy.tv), NULL);            /* source: libc time */
+        entropy.rnd = rand();                               /* source: libc PRNG */
+        entropy.cnt = prng->cnt++;                          /* source: local counter */
 
         /* pass entropy into MD5 engine */
         if (md5_update(prng->md5, (void *)&entropy, sizeof(entropy)) != MD5_RC_OK)

CVSTrac 2.0.1