summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
-rw-r--r--lib/libc/stdlib/malloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index 8348b7ede18..c4869527adb 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malloc.c,v 1.88 2008/02/20 18:31:34 otto Exp $ */
+/* $OpenBSD: malloc.c,v 1.89 2008/04/13 00:22:16 djm Exp $ */
/*
* ----------------------------------------------------------------------------
@@ -1140,7 +1140,7 @@ malloc_bytes(size_t size)
if (malloc_guard) {
/* Walk to a random position. */
- i = arc4random() % bp->free;
+ i = arc4random_uniform(bp->free);
while (i > 0) {
u += u;
k++;