summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2014-12-13 08:57:16 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2014-12-13 08:57:16 +0000
commit292819d24d89ae89cfe0a829852216b5b24365fc (patch)
tree26c867229d9fe431ca6d6cd46d50c9ddffbec24c /app
parent5eba463a5beb094a50a0fc897dae32ac8684c86e (diff)
fix arc4random_uniform() usage. Noticed by deraadt@
Diffstat (limited to 'app')
-rw-r--r--app/ico/ico.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/ico/ico.c b/app/ico/ico.c
index 5eb26c91c..e3bdebed5 100644
--- a/app/ico/ico.c
+++ b/app/ico/ico.c
@@ -1013,8 +1013,8 @@ do_ico_window(void *ptr)
icoX = ((closure->winW - icoW) * (rand() & 0xFF)) >> 8;
icoY = ((closure->winH - icoH) * (rand() & 0xFF)) >> 8;
#else
- icoX = ((closure->winW - icoW) * arc4random_uniform(0xFF)) >> 8;
- icoY = ((closure->winH - icoH) * arc4random_uniform(0xFF)) >> 8;
+ icoX = ((closure->winW - icoW) * arc4random_uniform(0x100)) >> 8;
+ icoY = ((closure->winH - icoH) * arc4random_uniform(0x100)) >> 8;
#endif
/* Bounce the box in the window */