Skip to content

Commit 56dc2eb

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: random: Do not trust arc4random_buf() on glibc (#10390)
2 parents a408781 + 57b362b commit 56dc2eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/random/random.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, bool should_throw)
502502
}
503503
return FAILURE;
504504
}
505-
#elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001) || defined(__APPLE__) || defined(__GLIBC__))
505+
#elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001) || defined(__APPLE__))
506506
arc4random_buf(bytes, size);
507507
#else
508508
size_t read_bytes = 0;

0 commit comments

Comments
 (0)