Module Name:    src
Committed By:   riastradh
Date:           Sun Jun 23 02:38:22 UTC 2013

Modified Files:
        src/sys/lib/libkern: arc4random.c

Log Message:
Account bytes drawn from initial call to libkern arc4random.

XXX This unlocked initialization looks rather bogus...


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/lib/libkern/arc4random.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libkern/arc4random.c
diff -u src/sys/lib/libkern/arc4random.c:1.33 src/sys/lib/libkern/arc4random.c:1.34
--- src/sys/lib/libkern/arc4random.c:1.33	Sun Jun 23 02:35:24 2013
+++ src/sys/lib/libkern/arc4random.c	Sun Jun 23 02:38:22 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: arc4random.c,v 1.33 2013/06/23 02:35:24 riastradh Exp $	*/
+/*	$NetBSD: arc4random.c,v 1.34 2013/06/23 02:38:22 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2011 The NetBSD Foundation, Inc.
@@ -251,6 +251,7 @@ _arc4randbytes(void *p, size_t len)
 		arc4_init();
 		/* avoid conditionalizing locking */
 		arc4randbytes_unlocked(p, len);
+		arc4_numbytes += len;
 		return;
 	}
 	mutex_spin_enter(&arc4_mtx);

Reply via email to