Module Name: src
Committed By: jruoho
Date: Wed Mar 28 10:38:00 UTC 2012
Modified Files:
src/tests/lib/libc/stdlib: t_random.c
Log Message:
Apparently there is a CVE coming for the bug, so append that to a comment.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/stdlib/t_random.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libc/stdlib/t_random.c
diff -u src/tests/lib/libc/stdlib/t_random.c:1.1 src/tests/lib/libc/stdlib/t_random.c:1.2
--- src/tests/lib/libc/stdlib/t_random.c:1.1 Wed Mar 28 10:33:57 2012
+++ src/tests/lib/libc/stdlib/t_random.c Wed Mar 28 10:38:00 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: t_random.c,v 1.1 2012/03/28 10:33:57 jruoho Exp $ */
+/* $NetBSD: t_random.c,v 1.2 2012/03/28 10:38:00 jruoho Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_random.c,v 1.1 2012/03/28 10:33:57 jruoho Exp $");
+__RCSID("$NetBSD: t_random.c,v 1.2 2012/03/28 10:38:00 jruoho Exp $");
#include <atf-c.h>
#include <stdlib.h>
@@ -52,6 +52,9 @@ ATF_TC_BODY(random_zero, tc)
size_t i, j;
long x;
+ /*
+ * See CVE-2012-1577.
+ */
srandom(0);
for (i = j = 0; i < n; i++) {