summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/lynx/WWW
diff options
context:
space:
mode:
authorRobert Nagy <robert@cvs.openbsd.org>2005-11-27 21:45:21 +0000
committerRobert Nagy <robert@cvs.openbsd.org>2005-11-27 21:45:21 +0000
commitb3bc7c4e0de0f2b82ba5379e8f5a6a54549d565f (patch)
tree8353c6429564ad8bdb7cd0fef7faf0ab1b3c1954 /gnu/usr.bin/lynx/WWW
parentb2fafc5cbfb504a474834fb4200f4bce2e91a1c5 (diff)
make lynx(1) to use arc4random(4) instead of other random functions;
avoid a segfault by checking the value of TAB TO; from Alexey Dobriyan <adobriyan@gmail.com>; pushed by deraadt@
Diffstat (limited to 'gnu/usr.bin/lynx/WWW')
-rw-r--r--gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.c b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.c
index 93fe4bb489e..fd3e11f76ac 100644
--- a/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.c
+++ b/gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.c
@@ -130,7 +130,9 @@ PUBLIC void HTSSLInitPRNG NOARGS
RAND_seed((unsigned char *)&pid, sizeof(pid));
/* Initialize system's random number generator */
RAND_bytes((unsigned char *)&seed, sizeof(long));
+#if !defined(__OpenBSD__)
lynx_srand(seed);
+#endif
while (RAND_status() == 0) {
/* Repeatedly seed the PRNG using the system's random number generator until it has been seeded with enough data */
l = lynx_rand();