diff options
| author | 2005-11-27 21:45:19 +0000 | |
|---|---|---|
| committer | 2005-11-27 21:45:19 +0000 | |
| commit | f9a97b6ce85b775cda771636d4631bf7a073abce (patch) | |
| tree | 97fc7000d022e249893ee590b9101f9d3c635449 /gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.c | |
| parent | Add a cast for (size_t)-1 because we know what we're doing, the ISO std. (diff) | |
| download | wireguard-openbsd-f9a97b6ce85b775cda771636d4631bf7a073abce.tar.xz wireguard-openbsd-f9a97b6ce85b775cda771636d4631bf7a073abce.zip | |
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/Library/Implementation/HTTP.c')
| -rw-r--r-- | gnu/usr.bin/lynx/WWW/Library/Implementation/HTTP.c | 2 |
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(); |
